Live expressions in low power mode
Hi everyone,
I am using a STM32L431 in my project and I am running into an unexpected behavior when debugging it. For context, I have an enum variable (lets say x_state) that represents different states in the logic. I have added this variable to the live expressions window in debug mode to observe the transitions of states. Additionally, the MCU is put in sleep mode when there is no interrupts for a specified duration to optimize power consumption. This is done using the following line in the code,

No matter the value of the x_state variable before entering sleep mode, the value is always reported as 0 when sleeping in the live expressions window. After exiting sleep mode, the value returns to its previous state before entering sleep. From the datasheet, the SRAM is kept on in sleep mode for the STM32L431.

Why am I observing a 0 when in sleep mode? I am using a STLINK-V3SET as my debugger and I have "Debug in low power modes" enabled in my Debug configurations.

Thanks in advance for your response!
