hello:
I use the example S32K144_ Project_ FlexCan downloaded from the official website,.FlexCan example path: S32K1xx_ cookbook\Examples\S32K144_ Project\S32K144_ Project_ FlexCan, use CAN0 mailbox 0 to send data and CAN0 mailbox 4 to receive data. Query the receive flag of mailbox 4 in the mian function. If the receive flag bit of mailbox 4 is equal to 1, use mailbox 0 to send a frame of data. Mailbox 4 receives CAN-ID of 0x511, and mailbox 0 sends CAN-ID of 0x555
Question:
When I use the pointer variable to receive the CANID number and modify the sending ID in the sending function at the same time, the receiving mailbox can receive the data of the sending mailbox, resulting in the receiving flag bit of mailbox 4 being equal to 1.
If I do not modify the following statement in the send function, the receiving mailbox cannot receive the data of the sending mailbox.
CAN0->RAMn[ 0*MSG_BUF_SIZE + 1] = 0x15540000; /* MB0 word 1: Tx msg with STD ID 0x555 */
Attached are codes
Solved! Go to Solution.
Hi,
set MCR[SRXDIS] bit
BR, Petr