2025-01-18 02:53 AM - edited 2025-01-18 02:54 AM
Hello,
I'am currently programming on a STM32G473. I'am sending CAN Message via the FDCAN peripheral.
In generally everything works, all my messages I put into the Tx Buffer are sent.
But in one little detail I'am confused:
In Figure 669 its described, that the TX buffer consists of 3 elements.
But if I want to find out in which index I have to put the next message by reading the TXFQS_TFQPI field, I'am confused why the reference manual describes a range of 0-3 for this field. So it seems that there are 4 messages? But in the Add-Request Register (TXBAR_AR) there are only 3 Bits for adding transmission requests (and the RAM buffer has only space for 3 Messages).
So is it maybe an error in the reference manual and the range of TXFQS_TFQPI is only 0-2 and in reality the peripheral will never give me a 3 in this field?
Or, if the range 0-3 is correct: What should I do if I get a put-Index of 3?
[Ref: RM0440, Rev. 8]
2025-01-18 07:36 AM
Good catch!
I think You are right this is a error in the Reference manual.
At least the HAL driver uses the TFQPI field with out any check for values > 2 (this would write the Message outside of the Message RAM!).
Let's see if some one from ST has some insight.
Martin
2025-01-18 12:34 PM
Perhaps 3 means the buffer is full.
And there is nowhere else to write))