MPC5643L can module Tx

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

MPC5643L can module Tx

804 Views
haotianwei1983
Contributor I

hello everyone. I am doing the CAN communication fucntion on the MPC5643L platform and encounter a problem. I set MB[0] of CAN_0 as Tx MailBox and set baud rate equals to 500K. I can receive cam message using CANOE but all the data area are 0 and ID too. This bothered me for some days. I don't know where is wrong. My whole project is in attachment.

 

Thank you very much.

Original Attachment has been moved to: vcu_5in1.zip

Labels (1)
0 Kudos
Reply
2 Replies

600 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Selected clocking config could bring an issue. You set the Peripheral set 0 clock to 10Mhz and CAN CPI clock running from FMPLL0 (120Mhz). Note: from Table 10.1 of the device RM the FlexCAN clock should be <= 60MHz.

But there are others more important requirements stated in the FlexCAN chapter 24.4.8.5 Arbitration and Matching Timing

• A valid CAN bit timing must be programmed

• The peripheral clock frequency can not be smaller than the CPI clock frequency

• There must be a minimum ratio between the peripheral clock frequency and the CAN bit rate, as specified in Table 24-11

You do not fulfill the first and second one. Thus I recommend you to increase the Peripheral clock frequency, run the CPI clock from XTAL and recalculate CAN bit timing to reflect XTAL as a source clock and provide valid Bit timing setting.

BR, Petr

0 Kudos
Reply

600 Views
haotianwei1983
Contributor I

Thank you. This problem has been solved.

0 Kudos
Reply