FIFO - Reset New Data Register
Company  
ST Home | Microcontrollers

Index  »  ST10  »  FIFO - Reset New Data Register
     
   FIFO - Reset New Data Register
 Moderated by :   »  Max  -  Kenshin  -  Najoua

Author
beginning argument    ( Replies received: 3 )
stefan.nischwitz   Posted 19-09-2008 at 17:10   



Registered on :
09-19-2009

Messages : 4

 OFF-Line

Hi,

I´m using a ST10F272 for communication to external ECU´s over CAN.

Actually i´m working on a FIFO buffer to store up to 8 CAN messages.
As the ST10 doesn´t provide a real FIFO buffer i tried to write my own algorithm therefore. First simply disable the reset of the NewDat Bit(s) until all messages have been read out to ensure that no new messages will be written in previous slots (that have already been read out).

As the New Data Register is read only, my very problem is now to access the "old" message objects and respectively the Command Mask register to reset the related NewDat Bit in the New Data Register.

Can anyone help me solving this problem ?



 Profile   Quote  
Mirco   Posted 19-09-2008 at 19:42   



Registered on :
03-30-2005

From Germany

Messages : 12

 OFF-Line

Hi Stefan,

at the first time you read out the messages from the message ram without set the bit TxRqst/NewDat to one in the command mask register --> the New Data bit remains set in the message object (and therefore in the new data register). Right?

To reset the New Data bit read out the messages a second time from the message RAM with bit TxRqst/NewDat set to one in the command mask register. The corresponding bits in the new data register then are automatically reseted.

This should solve your problem.




[ This message was edited by: Mirco on 19-09-2008 19:49 ]


[ This message was edited by: Mirco on 19-09-2008 19:50 ]



 Profile   www   Quote  
stefan.nischwitz   Posted 19-09-2008 at 21:29   



Registered on :
09-19-2009

Messages : 4

 OFF-Line

Quote:

at the first time you read out the messages from the message ram without set the bit TxRqst/NewDat to one in the command mask register --> the New Data bit remains set in the message object (and therefore in the new data register). Right?



Yes, you're right.

Thanks alot,
i will check it out on tuesday, won't be in the office until then.
Have a nice weekend and i'll let you know if i solved the problem.



PS: gecheckt ;)

[ This message was edited by: stefan.nischwitz on 21-09-2008 01:35 ]



 Profile   Quote  
stefan.nischwitz   Posted 24-09-2008 at 16:35   



Registered on :
09-19-2009

Messages : 4

 OFF-Line

As you may already know, its working.
The main problem was the message number i put to the reset function.
Just had to fix a sign flaw but took me hours to recognize.

thanks again for the help

[ This message was edited by: stefan.nischwitz on 24-09-2008 16:36 ]



 Profile   Quote  
On Top

Search in the forums
 
Jump To