STM32G474 FDCAN3 bit timing
Hello All,
I am trying to send some classic CAN messages via the FDCAN3 module on STM32G474CE device. I have only pins for FDCAN3 free. My FDCAN clock is PCLK1 with a frequency of 64MHz.
When I try to transmit a CAN message, firstly there is no transmission on the line (as seen from the oscilloscope and PCAN-Explorer software.
My questions are: 1. Can I even use FDCAN3 alone to transmit messages? Is it necessary to enable FDCAN1 for it or something?
- What should be the bit timing register values for nominal and data bit timing registers to achieve a Baud rate of 250 KBits per sec. Again, I want to send only normal classic CANopen messages and no CANFD messages.
Here is how CubeMX has programmed the configuration registers
hfdcan3.Instance = FDCAN3;
hfdcan3.Init.FrameFormat = FDCAN_FRAME_CLASSIC;
hfdcan3.Init.Mode = FDCAN_MODE_NORMAL;
hfdcan3.Init.AutoRetransmission = DISABLE;
hfdcan3.Init.TransmitPause = DISABLE;
hfdcan3.Init.ProtocolException = DISABLE;
hfdcan3.Init.NominalPrescaler = 16;
hfdcan3.Init.NominalSyncJumpWidth = 1;
hfdcan3.Init.NominalTimeSeg1 = 13;
hfdcan3.Init.NominalTimeSeg2 = 2;
hfdcan3.Init.DataPrescaler = 16;
hfdcan3.Init.DataSyncJumpWidth = 1;
hfdcan3.Init.DataTimeSeg1 = 13;
hfdcan3.Init.DataTimeSeg2 = 2;
hfdcan3.Init.StdFiltersNbr = 1;
hfdcan3.Init.ExtFiltersNbr = 0;
hfdcan3.Init.TxFifoQueueMode = FDCAN_TX_FIFO_OPERATION;
if (HAL_FDCAN_Init(&hfdcan3) != HAL_OK)
{
Error_Handler();
}
Any help on this?
