Skip to main content
Visitor II
May 9, 2024
Solved

STM32G474RET FDCAN Tx FIFO free level always be 0

  • May 9, 2024
  • 1 reply
  • 1090 views

1. [Part Number] STM32G474RET
2. [Environment] CubeMx on custom board
3. [Schematics] NA
4. [Details] 

The function "HAL_FDCAN_GetTxFifoFreeLevel"  always return 0, Tx FIFO cant be cleaned, but my can bus is in error-active status, TEC is 0, REC is 0
5. [Expected behavior] The messages in Tx FIFO should be cleaned normally 
6. [How to reproduce] Keep sending a CAN FD message every 140us by function "HAL_FDCAN_AddMessageToTxFifoQ"
7. [Occurrence] Maybe 1 time per hour, maybe not happen a whole day. 
8. [Sanity checks] can bus is in error-active status, TEC is 0, REC is 0
    This topic has been closed for replies.
    Best answer by mƎALLEm
    6. [How to reproduce] Keep sending a CAN FD message every 140us by function "HAL_FDCAN_AddMessageToTxFifoQ"

     Every 140us? why? very short as timing. Could you please relax the timing and test for example with 100ms?

    1 reply

    mƎALLEmAnswer
    Technical Moderator
    July 5, 2024
    6. [How to reproduce] Keep sending a CAN FD message every 140us by function "HAL_FDCAN_AddMessageToTxFifoQ"

     Every 140us? why? very short as timing. Could you please relax the timing and test for example with 100ms?