msgid_buf = 1234UL; Hi,
I'm having issues writing to the MSGID field of the CANBUS controller.
Specifically, the value I read from the MSGID.all field comes out as a different value every time no matter what I write to it.
Other MBOXes work fine. I have tried this with, and without the "shadow" register, although example code from the SPRA876a document does not use the shadow register.
The code below produces this output:
(Canbus init is not shown, and other mailboxes work (confirmed with another device on the RX end))
MSGID_BUF: 0x000004D2
MSGID: 0x0D0B8801
The value displayed for MSGID changes every time.
puts("MSGID_BUF: "); putxxxx(msgid_buf); puts("\n"); struct MBOX shadow_mbox = ECanaMboxes.MBOX0; shadow_mbox.MSGID.all = msgid_buf; ECanaMboxes.MBOX0 = shadow_mbox; puts("MSGID: "); putxxxx(ECanaMboxes.MBOX0.MSGID.all);