S32K144 FlexCan receiving mailbox can receive data from sending mailbox

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K144 FlexCan receiving mailbox can receive data from sending mailbox

Jump to solution
1,066 Views
TM_207
Contributor I

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.

15204692296_0-1677649220327.png

15204692296_1-1677649235331.png

15204692296_2-1677649247310.png

15204692296_3-1677649429603.png

 

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

 

 

0 Kudos
Reply
1 Solution
1,051 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

set MCR[SRXDIS] bit

PetrS_0-1677652651013.png

BR, Petr

View solution in original post

2 Replies
1,052 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

set MCR[SRXDIS] bit

PetrS_0-1677652651013.png

BR, Petr

1,039 Views
TM_207
Contributor I
Thank you. I know the reason for my error, because the CAN-ID number I sent and received is the same. If the CAN-ID I sent is not within the received CAN-ID number, this problem will not occur
0 Kudos
Reply