cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474RET FDCAN Tx FIFO free level always be 0

eason_Yi
Associate II

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
1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee
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?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
SofLit
ST Employee
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?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.