Skip to main content
Graduate II
February 27, 2025
Solved

STM32G0 transition from Run Mode to LP Sleep Mode

  • February 27, 2025
  • 2 replies
  • 631 views

Hello, the STM32G0 low-power state diagram (Figure 8 below) is in the ref. manual RM0444 on page 127.
It shows that a direct transition from Run Mode to LP Sleep Mode is not possible.
Questions:
* Is there a simple method to transition from Run Mode to LP Sleep Mode by 'passing' through LP Run Mode? 
* After waking up from LP Sleep Mode, where does code execution continue?
Reason for the question:
Our application needs a low-power mode where the MCU is turned off (no communication with external devices), but can wake up within approx. 500 ms and begin executing at a specific point in the firmware.

Thank you!

Kmax18_0-1740672344291.png

 

    This topic has been closed for replies.
    Best answer by TDK

    > Is there a simple method to transition from Run Mode to LP Sleep Mode by 'passing' through LP Run Mode? 

    You can only transition to LP Sleep from LP run.


    > After waking up from LP Sleep Mode, where does code execution continue?

    The only arrow out of LP sleep leads to LP Run. That is the state it's in after it wakes up.

     

    2 replies

    Super User
    February 27, 2025

    @Kmax18 wrote:

    * After waking up from LP Sleep Mode, where does code execution continue?


    Depends on how you enter the LP mode:

    AndrewNeil_0-1740676765298.png

    https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf#page=127

    If you use the WFI or WFE instructions, then execution continues as normal.

    TDKAnswer
    Super User
    February 27, 2025

    > Is there a simple method to transition from Run Mode to LP Sleep Mode by 'passing' through LP Run Mode? 

    You can only transition to LP Sleep from LP run.


    > After waking up from LP Sleep Mode, where does code execution continue?

    The only arrow out of LP sleep leads to LP Run. That is the state it's in after it wakes up.