AnsweredAssumed Answered

STM32F3 stop mode problem (WFE)

Question asked by arnold.rene on Jan 30, 2013
Latest reply on Oct 8, 2015 by Zhang.Yale
Hi,

we have a problem with the STOP mode of the STM32F3. We have the feeling, that the F3 immediately returns from STOP mode, if ANY interrupt is enabled and has been activated before entering the STOP mode. The second entry into STOP mode is working (does not return without an event). We have a little demo for the STM32F3DISCOVERY board, that demonstrates this behaviour (the main.c is attached).

To provoke the error, do the following:
1. disable ("comment-out") the second WFE in line 58
2. Build and run the project
3. Press and release the button. Nothing to be seen, but in fact the LED is switched on and off very fast (can be seen with an osci; the same signal is on PA3 for verfication).

With the following change the error could be "worked around" (at least in my tests):
1. Enable the 2nd WFE and all following NOPs
2. Build and run the project
3. Press and Release the button.  After releasing the button the blue LED is switched on, the MCU is in STOP mode now.
4. Press and release the button. The MCU wakes up, the LED is switched off.

Another problem occurs, if you remove the 4 NOPs after the 2nd WFE. Then the core goes into hardfault handler.

With an STM32F1 and L1 we don't have these problems! Can anyone else confirm this behaviour and/or has an explanation for it? Any general comments and hints related to the STOP mode especially with the STM32F3xx are appreciated. Has anyone the STOP mode of the STM32F3 working??

thanks in advance,
René

Attachments

Outcomes