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
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.
BR, Petr