S32K144 FlexCan receiving mailbox can receive data from sending mailbox

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144 FlexCan receiving mailbox can receive data from sending mailbox

ソリューションへジャンプ
1,067件の閲覧回数
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 件の賞賛
返信
1 解決策
1,052件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

set MCR[SRXDIS] bit

PetrS_0-1677652651013.png

BR, Petr

元の投稿で解決策を見る

2 返答(返信)
1,053件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

set MCR[SRXDIS] bit

PetrS_0-1677652651013.png

BR, Petr

1,040件の閲覧回数
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 件の賞賛
返信