How to receive many data from different ids by CAN

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

How to receive many data from different ids by CAN

1,571 Views
bhtybyb
Contributor II

when I use S32R274 CAN receive data, I want receive many data from different ids, i can receive many data form different ids by many MB . how to use one MB to receive many ids?

0 Kudos
4 Replies

742 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

try to clear Mask register, either global or individual, whichever you use. 

Clearing mask register the incomming ID is don't care and all IDs will be received into defined MB.

BR, Petr

0 Kudos

742 Views
bhtybyb
Contributor II

there are some questions about MB , I set seven MB from MB[0] to MB[6] to receive ,but only MB[0],MB[1],MB[2],MB[3] can be interrupted ,and MB[4],MB[5],MB[6] can not be interrupted. 

There is what I set IMASK

CAN_0.IMASK1.R = 0x0000007F; 

do you know what i wrong.

0 Kudos

742 Views
PetrS
NXP TechSupport
NXP TechSupport

did you also enable interrupt in INTC for vector #523 which belongs to CAN0 MB4-7?

Set INTC.PSR[523].R and define your ISR routine into vector table.

BR, Petr

0 Kudos

742 Views
bhtybyb
Contributor II

thanks for you reply. I will try it , thanks again.

0 Kudos