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.
Hello Expert,
I use to TCAN4550 to transmit a CAN FD frame with 16 bytes of data. The data length is defined as 16 bytes. The baudrate for data is 2mbps, and 500kbps for header. This is code used for header of the frame.
uint8_t data[16] = {0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0x11, 0x22, 0x33, 0x44, 0x5A, 0x5B, 0x5c, 0x5d};
header.DLC = MCAN_DLC_16B;
header.ID = 0x145;
header.FDF = 1;
header.BRS = 1;
header.EFC = 0;
header.MM = 1;
header.RTR = 0;
header.XTD = 0;
header.ESI = 0;
retVal = MCAN_WriteTXFIFO(0, &header, data);
AHB_WRITE_B_FL_32(M_CAN_TXBAR, 0x00000001);
I transmitted 16 bytes data, but I only got 8 bytes. I am using CAN FD analyzer as 2nd node. Which section should I pay more attention to find the root causes? Thanks
Hello Eric,
Attached please find the waveform I captured from the scope. It is traditional CAN message rather than CAN-FD message. Thanks
Thanks Eric,
I enabled the FDF bit in CCCR and TX header, and the TBDS[2:0] bits of TXESC is 0x7 (64 bytes).
If I use different baudrate for data, I saw the correct baudrate for both data (2mbps) and arbitration field (500kbps). The baudrate is switching at BRS bit field, and causes the BRS bit width be 1.5us (should be 2us for 500kbps), and the following ESI bit is 500ns (for 2mbps baudrate). The DLC is 0x1010 which means 16 bytes data, but only 8 bytes data are transmitted.
The data transmitted are 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
I am not sure if the CRC is correct, will check. The CAN FD analyzer says there is stuff error in the frame.