cancel
Showing results for 
Search instead for 
Did you mean: 

FIFO - Reset New Data Register

stefan
Associate II
Posted on September 24, 2008 at 13:05

FIFO - Reset New Data Register

4 REPLIES 4
stefan
Associate II
Posted on September 19, 2008 at 13:40

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 ?

mirco23
Associate II
Posted on September 19, 2008 at 16:12

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 ]

stefan
Associate II
Posted on September 19, 2008 at 17:59

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.

:D

PS: gecheckt 😉

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

stefan
Associate II
Posted on September 24, 2008 at 13:05

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 ]