AnsweredAssumed Answered

MPC574x CANFD @4MBPS

Question asked by Akshay H V on May 23, 2017
Latest reply on May 23, 2017 by Petr Stancik

Hello,

I have been trying to test the CANFD with different speeds. currently I am able to work the CANFD at 2 MBPS. The register initialization is as follows.
the Baudrate resgisters are configured to 500 kbps and Data rate registers are configured with 2 MBPS. The fcanclk is 40Mhz.

lp_FlexCan_fd->CTRL1.B.PRESDIV = 0x03;
lp_FlexCan_fd->CTRL1.B.PROPSEG = 0x07;
lp_FlexCan_fd->CTRL1.B.PSEG1 = 0x05;
lp_FlexCan_fd->CTRL1.B.PSEG2 = 0x04;
lp_FlexCan_fd->CTRL1.B.RJW = 0x02;
lp_FlexCan_fd->FDCBT.B.FPRESDIV = 0x01 ;
lp_FlexCan_fd->FDCBT.B.FPROPSEG = 0x03 ;
lp_FlexCan_fd->FDCBT.B.FPSEG1 = 0x02 ;
lp_FlexCan_fd->FDCBT.B.FPSEG2 = 0x02 ;
lp_FlexCan_fd->FDCBT.B.FRJW = 0x02 ;

I want to test the CANFD with 4 MBPS so ... I did the calculations using this algorithms by keeping PRESDIV to 0 and I got the N0Tq as 10. And I kept the initialzation as below

 


lp_FlexCan_fd->CTRL1.B.PRESDIV = 0x03;
lp_FlexCan_fd->CTRL1.B.PROPSEG = 0x07;
lp_FlexCan_fd->CTRL1.B.PSEG1 = 0x05;
lp_FlexCan_fd->CTRL1.B.PSEG2 = 0x04;
lp_FlexCan_fd->CTRL1.B.RJW = 0x02;
lp_FlexCan_fd->FDCBT.B.FPRESDIV = 0x00;
lp_FlexCan_fd->FDCBT.B.FPROPSEG = 0x03;
lp_FlexCan_fd->FDCBT.B.FPSEG1 = 0x02;
lp_FlexCan_fd->FDCBT.B.FPSEG2 = 0x02;
lp_FlexCan_fd->FDCBT.B.FRJW = 0x02;

But this configuration is not working for me.. So please have look into my intialization and correct me if I am doing anything wrong in here

 

 

And I would be nice if you can clarify me how the PROPSEG, PSEG1,PSEG2 is calculated once we get the N0Tq = 10,12..... etc

Outcomes