AnsweredAssumed Answered

CAN FD Bit Timing Calculation

Question asked by Nitin verma on Apr 25, 2017
Latest reply on Apr 28, 2017 by Petr Stancik

We are working on S32K144 board with REV1,
1. Clock source is BUS clock with 40Mhz frequency
2. Rx_Fifo = false
3. Fd_Enable = true
4. /* Macros to Configure Tx message buffer */
#define CANTX_DATALENGTH 64u
#define CANTX_FDENABLE 1u
#define CANTX_FDPADDING 0X00u
#define CANTX_ENABLEBRS 1u
The above mentioned values are passed in the function "FLEXCAN_DRV_ConfigTxMb"

 

/* Macros to Configure Rx message buffer */
#define CANRX_DATALENGTH 64u
#define CANRX_FDENABLE 1u
#define CANRX_FDPADDING 0u
#define CANRX_ENABLEBRS 1u
The above mentioned values are passed in the function "FLEXCAN_DRV_ConfigRxMb"

 

5. /* Macros for CAN_Baudrate setting for (CAN0->CBT with 500Kbps nominal bit rate) */
#define BAUDRATE_PROPSEG 46u
#define BAUDRATE_PHASESEG1 15u
#define BAUDRATE_PHASESEG2 15u
#define BAUDRATE_PREDIVIDER 0x00u
#define BAUDRATE_RJUMPWIDTH 15u

 

/* Macros for CAN_FD_Baudrate setting for (CAN0->FDCBT with 2Mbps higher bit rate)*/
#define BAUDRATE_PROPSEGFD 7u
#define BAUDRATE_PHASESEG1FD 7u
#define BAUDRATE_PHASESEG2FD 3u
#define BAUDRATE_PREDIVIDERFD 0x00u
#define BAUDRATE_RJUMPWIDTHFD 3u

 

With the above settings its working properly, Now I have S32K144 board with REV2,Clock source as FLEXCAN_CLK_SOURCE_SYS with 80Mhz frequency with SDK version as 0.9.0 . Please provide me the values needs to be passed for data bit rate of 2mbps and nominal bit rate of 500kbps. And also provide how the calculations will be done.

Outcomes