AnsweredAssumed Answered

STM32H743 FDCAN confused?

Question asked by zuo shengting on May 26, 2018


   now i have some question about FDCAN, sorry for troubling you.

   I have a device, which is used CAN OPEN to communication. Also i have a can to usb tool, which is used to monitor the CAN OPEN data(CAN_H, CAN_L). So, i am using stm32H743 FDCAN1 + can transfer chip (like TJA1050) to communicate with the CAN OPEN device,and the can2usb tool monitor the data.

   however, there is a question really confused me. 

   The CAN OPEN device sends 8 bytes data to the stm32 (the data are 0x60 0x64 0x00 0x00 0x03 0x00 0x00 0x00). And the can2usb tool monitor the data is the same as origin data. But in stm32 can IR, read the data is 0x60 0x64 0x00 0x00 0x09 0x00 0x00 0x00. i check the reg 

The reg is ok, no error occur. 

And here is my initial code FD CAN:


hfdcan1.Instance = FDCAN1;
hfdcan1.Init.FrameFormat = FDCAN_FRAME_CLASSIC;
hfdcan1.Init.Mode = FDCAN_MODE_NORMAL;
hfdcan1.Init.AutoRetransmission = DISABLE;
hfdcan1.Init.TransmitPause = DISABLE;
hfdcan1.Init.NominalPrescaler = 1;
hfdcan1.Init.NominalSyncJumpWidth = 10;
hfdcan1.Init.NominalTimeSeg1 = 10;
hfdcan1.Init.NominalTimeSeg2 = 5;
hfdcan1.Init.DataPrescaler = 1;
hfdcan1.Init.DataSyncJumpWidth = 10;
hfdcan1.Init.DataTimeSeg1 = 10;
hfdcan1.Init.DataTimeSeg2 = 5;
hfdcan1.Init.MessageRAMOffset = 0;
hfdcan1.Init.StdFiltersNbr = 0;
hfdcan1.Init.ExtFiltersNbr = 0;
hfdcan1.Init.RxFifo0ElmtsNbr = 10;
hfdcan1.Init.RxFifo0ElmtSize = FDCAN_DATA_BYTES_8;
hfdcan1.Init.RxFifo1ElmtsNbr = 0;
hfdcan1.Init.RxFifo1ElmtSize = FDCAN_DATA_BYTES_8;
hfdcan1.Init.RxBuffersNbr = 10;
hfdcan1.Init.RxBufferSize = FDCAN_DATA_BYTES_8;
hfdcan1.Init.TxEventsNbr = 0;
hfdcan1.Init.TxBuffersNbr = 10;
hfdcan1.Init.TxFifoQueueElmtsNbr = 10;
hfdcan1.Init.TxFifoQueueMode = FDCAN_TX_FIFO_OPERATION;
hfdcan1.Init.TxElmtSize = FDCAN_DATA_BYTES_8;


system clock is 400MHZ.


My question is , if anyone once have this problem? I am wondering the FDCAN CRC check is working? otherwise the wrong data can not have the interrupt.