how can I initlize MPC 5604 CAN 1

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

how can I initlize MPC 5604 CAN 1

Jump to solution
1,032 Views
Learner123
Contributor II

how can I initlize MPC 5604 CAN 1 ,i wanna routine program about how to initialize CAN module 1 to send and receive message through can bus

0 Kudos
1 Solution
1,015 Views
Learner123
Contributor II

thank you for your document,i still have question about Msg buffer,for CAN 1, we have 64 buffers,but how can we assign to transmitter and receiver ?

0-54 for receiver and 55-64 for transmitter?

still how i can get the head file MPC5604B_0M27V_0102.h ?

View solution in original post

0 Kudos
5 Replies
1,027 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

you can refer to https://www.nxp.com/docs/en/application-note/AN2865.pdf chapter 25.

BR, Petr

1,016 Views
Learner123
Contributor II

thank you for your document,i still have question about Msg buffer,for CAN 1, we have 64 buffers,but how can we assign to transmitter and receiver ?

0-54 for receiver and 55-64 for transmitter?

still how i can get the head file MPC5604B_0M27V_0102.h ?

0 Kudos
1,008 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it is up to user, each MB can be used for RX or TX operation.
For the device header file; use the one which is part of project generated in CodeWarrior or S32 Design Studio

BR, Petr

0 Kudos
999 Views
Learner123
Contributor II

for can 1 , I have 64 MB ,everytime I only use 1 MB to receive message from CAN receive interrupt;how could I efficiently use the 64 MB,I mean how could I use 2 or more MBs to receive message,the document only tells use 1 MB to do the work

0 Kudos
973 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

obviously more RX MBs are used if receiving different IDs, each MB receive its own message. Also you can receive messages for some ID range into single message configuring mask registers accordingly. If you are receiving single ID you can use just single MB and read it each time message comes. But you can also prepare more MBs for the same ID and create so called RX queue, so you would not need to read MBs so often. Refer to chapters Receive and Matching process of the RM for more info.

BR, Petr

0 Kudos