S32K144_FlexCAN

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K144_FlexCAN

1,446 次查看
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 项奖励
回复
1 回复

1,440 次查看
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