cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Error "SWD protocol implementation error (fa)"

SAB
Associate II

I am receiving this error consistently after leaving my STM32 idle for ~2s after running my program. This is well before the chip goes to sleep.

I am able to immediately press start again after this error occurs and continue logging until the chip goes to sleep, or I run the program again and the error occurs after 2s.

I am using the basic flow to monitor a few variables and connecting with an STLink V3SET

Is there anything else I can do to debug this?

1 ACCEPTED SOLUTION

Accepted Solutions

found my issue. there was a delayed write to the EEPROM, and some part of that EEPROM write process confuses the acquisition. disabling the EEPROM write stopped this error.

View solution in original post

7 REPLIES 7
stephane.legargeant
ST Employee

Hello

There could be some errors like this when debug port get disabled by software or going to sleep, but it seems sleep is not the issue.

I have one point which is not clear for me : When you say "I am able to immediately press start again after this error occurs and continue logging until the chip goes to sleep" Do you mean that when the error occurs, you can start again the acquisition by pressing "start acquisition" and the acquisition continues succefully, or do you mean the error is logged until chip goes to sleep ? (I have doubts about meaning of logging)

Additional question, what MCU is used ?

Thanks

Stephane

SAB
Associate II

Hi,

I am using an STM32G07.

Note: my program will "change states" when pressing a physical button. This button also wakes the MCU. Holding the button will cause me to stay in a new state, releasing it brings me to an idle state.

The error will log a single time, and pressing start after the error will allow the acquisition to start again. My definition of "logging" is acquiring data from the selected variables.

Here are all of the situations that can happen:

Press and release button (ensures MCU is awake) -> Start acquisition -> Stay idle -> [No error]

Press and release button -> Start acquisition -> press and hold button -> [No error]

Press and release button -> Start acquisition -> press and release button -> Wait 2 seconds -> [Error]

After first error: Start acquisition -> Stay idle -> [No second error]

After first error: Start acquisition -> Press and hold button -> [No second error]

After first error: Start acquisition -> Press and release button -> Wait 2 seconds -> [Second error]

stephane.legargeant
ST Employee

Hello

thanks for the detailed information. Right now, I have no idea, but I am wondering if the error occurs after 2 seconds, or is displayed with 2 seconds delay due to a timeout. Could you check that acquisition has worked properly during the 2 seconds after releasing the button ?

Thanks

Stephane

declareupdate
Associate III

I'm running into the same issue here. I'm using an STM32L031F6P6, with the stlink on a nucleo board. Had this monitoring a different chip without any of these errors recently. I'm getting two messages from "node:myProbe_Out"

SWD protocol implementation error (fa)

SWD protocol implementation error (fa): start

any ideas what could be causing this? I have a debug node connected to the variables node that feed into myProbe_Out, and I'm not seeing any traffic when this happens, so it doesn't seem to be from a message that myProbe_Out is receiving.

found my issue. there was a delayed write to the EEPROM, and some part of that EEPROM write process confuses the acquisition. disabling the EEPROM write stopped this error.

Wow disabling my EEPROM writing has made this issue a lot better! I need that EEPROM write though. This is interesting and I would really like to find the exact spot this is happening at. I'm wondering if it is also the cause of my disconnections in the IAR live view.

KJeps.3
Associate II

Hi,

Im also seem this on STM32G031, when i activate to re-write a flash page, it comes with same error.... i do not use the FAST write methode present in G0 series.. i use the doubleword methode...

I have not found a work-arround, cause i have to save the data from cubemonitor...

/Kasper