1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What would happen if you were to disable a MOB using the CANCDMOB register as the mailbox was in the process of being populated?

For example, say MOB0 is being populated by a message on the CAN bus (I'm not exactly sure how the MOB is filled). the CAN driver has stored the ID of the message in the CANIDT4 register and at this moment, a line of code sets CANCDMOB to 0. will the driver store the data from that message into MOB1(next available MOB with lowest priority) and set the RXOK bit for MOB1? If this is true, will MOB1's ID(CANIDT4) contain whatever was last stored in it from the message before and now contain the data that was suppose to be in MOB0. I'm having an issue where my SW is reading the ID of one message but uses the data from the message before it. It's not always all 8 bytes of data. I've seen 8 bytes, 7 bytes and 6 bytes of the data from the message before it. Any help would be useful. Thanks.

admin's test signature