S32K144_FlexCAN

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

S32K144_FlexCAN

586 Views
p_decesare
Contributor III

Hi, 

I'am using the example "FLEXCAN" for the s32k144 board. For my purpose, I want to have as baud rate 50KSamples/second. From the theory I understood that, it is important to modify some fields of CTRL register for the desired baud rate. So, I want to know if it's correct this configuration for the baud rate equal to 50KSamples/seconds.

CAN_CTRL1_PRESDIV(49) (40MHz/(49+1)) = 800KHz
CAN_CTRL1_PSEG2(3) /* Configure for 50 KHz bit time */
CAN_CTRL1_PSEG1(3) /* Time quanta freq = 16 time quanta x 50 KHz bit time= 800KHz */
CAN_CTRL1_PROPSEG(6) /* PRESDIV+1 = Fclksrc/Ftq = 8 MHz/8 MHz = 1 */
CAN_CTRL1_RJW(3) /* so PRESDIV = 0 */


Is this configuration correct for the baud rate equal to 50Ksamples/second?
In addition, how it is possible to modify the clock requirements for the slow run mode and so for the bus clock equal to 48MHz?
Thanks for your help

 

Best regards

Paola

 

0 Kudos
1 Reply

580 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

assuming the 40Mhz PE clock the setting looks correct.

For different PE clock you can try to use below excel tool for possible setting.

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/MPC5xxx-S32Kxx-CAN-CAN-FD-bit-timing-calculation...

 

BR, Petr