2024-10-25 06:58 AM - edited 2024-10-25 07:02 AM
I am working with STM32 U575/U5A5 series of STM32 controllers in low power mode. I have programmed the controller to enter into Stop 3 mode and wake from stop3 mode based on wakeup Pin(High on PF2). With this implementation issue what we observed is once immediately flashing hex file into controller using STlink programmer, Controller is entering in stop3 mode but it is not waking up from stop3 mode even after low to high transistion on wakeUp pin(PF2). If I remove the power and connect it back, it is working as expected enterning into stop mode 3 and waking up from stop mode 3 on low to high transistion on wakeUp pin(PF2) all the time.
The question here is why for the first time after flashing hex file into controller, entering into stop3 mode but not waking up from stop3 mode and requires power reset?
low power mode is configured as follows:
2024-10-25 07:27 AM
Hello @mohan-ltts ,
Did you suspend the SysTick interrupt before entering STOP mode?
To wake-up the system from Stop 3 low-power mode, you should redefine PWR_S3WU_IRQHandler (From NVIC table) to handle the interrupt request, then clearing wake-up flags.
Check also the wakeup source selection :
According to the RM0456 (section: 10.7.9 Stop 3 mode), you can exit the STOP 3 mode using WKUPx pin edge, RTC/TAMP event/interrupt, NRST pin external reset, IWDG reset, BOR reset.
I advise you to review the example provided in STM32CubeU5 :
Hope this helps you!
2024-10-25 08:51 AM
Hello @Imen.D
Code is working fine after power cycle the hardware, but why first time after flashing the code power cycle is required?
Tried suspending the SysTick interrupt before entering STOP mode, but still didn't help. Still it requires power cycle to work as expected
Actually our hardware has power backup capacitor, so to power cycle the board we need to remove input power supply as well as need to discharge the power backup capacitor which we can't do every time.
Thanks,
Mohan
2024-10-28 12:29 AM
Hello @Imen.D ,
In above code just i replaced "HAL_PWREx_EnterSTOP3Mode(PWR_STOPENTRY_WFI)" call with "HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI)" to check the behaviour of STOP2 mode. But still behaviour is same first time after flashing code it requires power cycle then only it is working as expected otherwise it is not waking up from STOP2 mode. So problem is not with handling PWR_S3WU_IRQHandler since it is required only for STOP3 mode and not for STOP2.
This exercise i performed to verify problem is with handling PWR_S3WU_IRQHandler or not.
2024-10-28 10:19 PM
Any update on this issue?
2024-10-30 05:37 AM
Hello @mohan-ltts
We have tested the scenario on our side and were unable to reproduce the problem. The MCU successfully enters STOP3 mode and wakes up without requiring a power reset.
To assist you more effectively, we kindly request that you share your project with us. This will enable us to provide you with the most accurate support.
2024-11-04 04:15 AM - edited 2024-11-04 04:16 AM
Hi,
Is there any difference between STMCubeProgrammer version v2.12.0 and v2.17.0?
If we flash the code using version 2.12.0 then power cycle is required, but if we flash the code using version 2.17.0 power cycle is not required.
any reason for this behaviour?
Thanks,
Mohanraj D
2024-11-04 04:50 AM
Hello @mohan-ltts
For assistance with the STM32Cube programmer, please post your question on the STM32Cube programmer forum.