This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

eCAN Timing Relation between Mailbox, RMP flag, GMIF flag



Dear Expert, 

What is the timing relation between mailbox updating, RMP flag and GMIF flag when eCAN controller receives one CAN message from the bus.

Based on SPRUEU1, following is my understanding, correct me if I am wrong:

1. eCAN controller receives one CAN message from bus and put it in the message buffer;

2. Starts to look for a RX mailbox with a message ID fit;

3. Move message objects from RX buffer to mailbox and set RMP and GMIF flags;

Assume that we have a RX mailbox hit and MIM is set. Following are my questions

1. Is RMP flag set after all the message objects have been moved to the mailbox or it is set immediately after the message ID fit is verified;

2. How much CPU cycles it is generally needed to move all CAN message objects from buffer to mailbox;

3. Is GMIF flag set at the same time as RMP flag? 

Thanks and regards!

Zhixiang

  • What is the timing relation between mailbox updating, RMP flag and GMIF flag when eCAN controller receives one CAN message from the bus.

    Based on SPRUEU1, following is my understanding, correct me if I am wrong:

    1. eCAN controller receives one CAN message from bus and put it in the message buffer;

    2. Starts to look for a RX mailbox with a message ID fit;

    3. Move message objects from RX buffer to mailbox and set RMP and GMIF flags;

    Answer: Your understanding of the 3 points above are correct.

     

    Assume that we have a RX mailbox hit and MIM is set. Following are my questions

    1. Is RMP flag set after all the message objects have been moved to the mailbox or it is set immediately after the message ID fit is verified;

    Answer: RMP flag, for a given mailbox, is set after all the contents (MSGID, data) is copied to the mailbox RAM.

     

    2. How much CPU cycles it is generally needed to move all CAN message objects from buffer to mailbox;

    Answer: The term “message object” refers to the mailbox. I believe you are actually referring to the “mailbox contents” like MSGID, DLC & databytes. So your question is probably “How many CPU cycles does it take to transfer the contents from the Receive-Buffer to the Mailbox RAM”? I do not have an exact number, but it should be no more than a few CPU cycles.

     

    3. Is GMIF flag set at the same time as RMP flag? 

    Answer: Again, I do not have an exact number, but it should be no more than one or two CPU cycles.

     

     

  • Hareesh,

    Thanks for your prompt answer. During the testing, it was found that eCAN controller decided which mailbox to store the eCAN message (MSGID comparison) even before the message was completely received in the eCAN buffer. This was actually not so exact as the description in the eCAN manual, though it would not introduce any issue. :-)

    Zhixiang
  • Zhixiang,

    "....During the testing, it was found that eCAN controller decided which mailbox to store the eCAN message (MSGID comparison) even before the message was completely received in the eCAN buffer...."

    Exactly how was this verified experimentally?