cancel
Showing results for 
Search instead for 
Did you mean: 

I3C: TXFNFF never set when debugging

HalloWelt
Associate

Setup: NUCLEO-H503RB with X-NUCLEO-IKS4A1, using STM32CubeIDE.

To familiarize myself with I3C, I am playing around in this setup and have some source code which causes I3C interaction between controller and target. I have a logic analyzer attached, and all looks good.

However, this only works when executing the code without breakpoints. As soon as I break to debug, I can never see the "Tx FIFO not full flag" in the event register but the code relies on it. When I continue stepping, the code obviously misbehaves because it doesn't see the flag either. Code that was executed without breakpoints does see the flag and behaves as expected.

Does the flag auto-clear after a while? Where is this documented? Why do I never see it in the debugger? This prevents me from stepping through the code which contradicts the purpose of my setup.

Example: I hit a breakpoint in the interrupt handler in stm32h5xx_hal_i3c.c.

HalloWelt_0-1747214799915.png

The event register does not show the TXFNFF:

HalloWelt_1-1747214945509.png

But the ISR code has obviously seen it because the event register was read in line 1618 (first screenshot above) and stored in it_flags where bit 4 is now set:

HalloWelt_2-1747215025410.png

Any explanations?

1 ACCEPTED SOLUTION

Accepted Solutions
HalloWelt
Associate

ST customer support has solved this issue in an internal case (all credit goes to Radek!). The explanation is as follows:

In I3C_EVR, bit 11 (ERRF) is set (as seen in the screenshot above):

HalloWelt_1-1748006085367.png

Looking at I3C_SER, bit 6 (DOVR) is set (as seen in the screenshot above):

HalloWelt_0-1748005984317.png

So because of the breakpoint, the Tx FIFO was not filled in time and suffered from an under-run which resulted in the error state where the flag was cleared.

The peripherals are not stopped when the CPU is stopped by the debugger.

View solution in original post

3 REPLIES 3
Maxime_MARCHETTO
Community manager
Community manager

Hello @HalloWelt,

Welcome to the ST Community! 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

Regards,

Maxime


In order 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.
HalloWelt
Associate

ST customer support has solved this issue in an internal case (all credit goes to Radek!). The explanation is as follows:

In I3C_EVR, bit 11 (ERRF) is set (as seen in the screenshot above):

HalloWelt_1-1748006085367.png

Looking at I3C_SER, bit 6 (DOVR) is set (as seen in the screenshot above):

HalloWelt_0-1748005984317.png

So because of the breakpoint, the Tx FIFO was not filled in time and suffered from an under-run which resulted in the error state where the flag was cleared.

The peripherals are not stopped when the CPU is stopped by the debugger.

Amel NASRI
ST Employee

Thanks @HalloWelt for coming back to share the solution/answer with the Community!

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.