This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TCAN4550EVM: TCAN4550 data bit timing issue

Part Number: TCAN4550EVM
Other Parts Discussed in Thread: TCAN4550


I'm using  TCAN4550EVM to my board by wired connection.

and I'm trying Linux Driver code (starting with lastest version..

Linux code provides a bit timing calcurate fuction ( can_calc_bittiming() ) and I tried that method.

TCAN4550EVM supplied 40MHz CAN clock and  I tested CAN rate was 500 kHz, and FD data rate 2MHz.

according to Linux code, bittiming const was calcurate like this

static int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt,
			     const struct can_bittiming_const *btc,
			     const u32 *bitrate_const,
			     const unsigned int bitrate_const_cnt)
	if (!bt->tq && bt->bitrate && btc)
		err = can_calc_bittiming(dev, bt, btc);

I entered "bt->bitrate" like above value and "btc" value like by TI Linux code.

static const struct can_bittiming_const m_can_bittiming_const_31X = {
	.tseg1_min = 2,		/* Time segment 1 = prop_seg + phase_seg1 */
	.tseg1_max = 256,
	.tseg2_min = 2,		/* Time segment 2 = phase_seg2 */
	.tseg2_max = 128,
	.sjw_max = 128,
	.brp_min = 1,
	.brp_max = 512,
	.brp_inc = 1,

static const struct can_bittiming_const m_can_data_bittiming_const_31X = {
	.tseg1_min = 1,		/* Time segment 1 = prop_seg + phase_seg1 */
	.tseg1_max = 32,
	.tseg2_min = 1,		/* Time segment 2 = phase_seg2 */
	.tseg2_max = 16,
	.sjw_max = 16,
	.brp_min = 1,
	.brp_max = 32,
	.brp_inc = 1,

then bit timing calcurated like this:

bt timing : br:500000 brp:1, proseg:34 sjw:1 tseg1:35 tseg2:10 sp:875 tq:25

data bt timing : br:2000000 brp:1, proseg:7 sjw:1 tseg1:7 tseg2:5 sp:750 tq:25

then I tested that value, Normal CAN or CANFD signal was fine, but CANFD BRS signal was not works.

that means those calcurated data bi timing value was not works.

Q1) Is my method correct? when TI code development, what method was used?

Q2) Is those calcurated value correct?

Q3) could i get sample bit timing value like those setting?

thank you

  • Hi DH,

    The bit rate configurations you listed look good. The number of time quanta for each is equal to the number of 40Mhz clock divisions at the given bit rate. These would be fine to configure TCAN4550 for CAN FD. The actual sampling point is selected based on the data rate and previous projects from the software developers (external from TI). 

    Could you elaborate on the problem you're facing? It sounds like the CAN FD communication is working, but the bit rate switch (BRS) bit is not set. If this is the case, please ensure that the "bit rate switch enable" bit is set in the control register (register h1018, bit [9]). 
    If this is not the case and the device is not able to send CAN data, could you share the register data of the device when the attempt is made to send the message?

    Eric Schott

  • Hi Eric.

    Thank you for your answer. I did solved my issue after setting the sample point correctly.