cancel
Showing results for 
Search instead for 
Did you mean: 

Problems reading flash memory through debugger while using WFE/WFI on STM32F429

Arlet Ottens
Associate II

I am using an STM32F429VGT6 with SWD debugger, and OpenOCD software 0.10.0.

I am trying to dump the contents of the flash memory at 0x08000000 through debugger.

If I don't use any WFE/WFI in my code, this works fine.

If I put a WFE at the beginning of the code, before any interrupts are enabled, the device is stuck in continuous SLEEP mode, and it also works fine.

However, when I used WFE/WFI in normal code, and the device is switching between run/sleep modes, I sometimes get the wrong output when dumping the flash. There are no errors reported, but it just shows the wrong data (mostly zeroes, it seems)

In all cases, the debugger sets DBGMCU_CR to 7. I am not using STOP/STANDBY mode, just sleep.

I have also tried the same code on a STM32F427VIT6, and everything works fine there, but I do get the same problem on a different board with a STM32F429VIT6.

If I try to read the SRAM contents instead, everything looks good.

Is there anything I can do to fix this ?

Edit: attached smallest version of demo code I could make to show the problem. Note that demo code enables the PLL. I have not been able to replicate the problem without use of the PLL.

0 REPLIES 0