MPC5748 CAN FD

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

MPC5748 CAN FD

1,242 Views
shijiaguo
Contributor II

Hello all!

 

I'm running into a timing issue while configuring the CAN FD on MPC5748G micro.

 

I’m using 40MHz F40 clock as CAN oscillator clock (fCANCLK). And my arbitration bit rate is set at 500K, and the data bit rate is set to be twice as that =1000K. The PSEG and DIV settings for arbitration and data are as follows:

 

 175479_175479.png1.png

175480_175480.png2.png

 

The arbitration phase turns out to be ok. However, the data rate in the data phase is slightly imperfect. The data is supposed to be 1000ns/bit, however, on my scope it’s showing ~960ns/bit. Here’s the screenshot (yellow and blue are CAN high and low, red is CANH – CANL, I’m sending data 0b1010101….). This is causing the Canalyzer not being able to receive data correctly. Does anyone have any idea what’s happening and how to make the timing more accurate?

 175484_175484.png3.png

 

 

 

Labels (1)
0 Kudos
1 Reply

641 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Shijia,

The length of data bit time is calculated as SYNC + FPROPSEG + (FPSEG1+1) + (FPSEG2+1).

FPROPSEG, FPSEG1, FPSEG2 are values written into FDCBT register.

So for your setting just increase FPROPSEG.

 

However it is recommended to have the same time quanta length for the data phase and set the sample time somewhere in the middle of the data bit time. So you can recalculate your setting to have the same prescaler for both nominal and data bit time.

BR, Petr

0 Kudos