We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'm using CAN communication on an XE164 (MultiCAN). Currently, I'm trying to use an RX FIFO and not having much luck with it. The FIFO is set up using DAVE, but when I watch in the debugger I can see that only the first slave object (BOT) is ever filled. The pointer CUR is not advanced after reception, it remains set on the BOT object. The PNEXT of the BOT object does point to the next slave object, and all other BOT/TOP pointers appear to be correct.
Can anyone figure how this might happen?
Regards, Alto Speckhardt
Hum... My experience is DAVE is not always right :(
Anyway, I could try to use DAVE for a setup but don't have time until next week at the earliest to test it.
I do see a problem that you (DAVE) is setting the RXEN bit in a slave object.
/// General Configuration of the Message Object 65 : /// - message object 65 is valid /// - message object is used as receive object /// - this message object is assigned to list 3 (node 2) CAN_MOCTR65H = 0x00A0; // load MO65 control register high CAN_MOCTR65L = 0x0000; // load MO65 control register low
My code...
*dst++ = MSGVAL; /* MOCTR */
From the manual...
In order to avoid direct reception of a message by a slave message object, as if it was an independent message object and not a part of a FIFO, the bit RXEN of each slave object must be cleared. The setting of the bit RXEN is "don't care" only if the slave object is located in a list not assigned to a CAN node.
Maybe you could change this and see if you get a different behavior?
Regards, Chris
Well... ;-)
Yes, you're absolutly right! When I began to manually (after the DAVE initialization) reset the RXEN bits in the slave objects the FIFO started to work as expected.
Thank you very much indeed!