Skip to main content
MHast.1
Associate II
August 28, 2023
Question

STM32WB LPSLEEP issue

Hello, I'm trying to implement Low power sleep on STM32WB. The sequence is as per LPSLEEP example:

HAL_PWREx_EnableFlashPowerDown(PWR_FLASHPD_LPSLEEP);
SystemClock_Decrease(); //MSI 2MHZ
HAL_SuspendTick();
HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);
//... Sleep until wake on interrupt (EXTI15_10_IRQn)

In my case CPU1 never sleeps, or it wakes straight away. I've tried disabling the other interrupts with HAL_NVIC_DisableIRQ(), __disable_irq(), no success.

What could be causing it? CPU2 and BLE stack are running, what needs to be done on this side? Thanks

    This topic has been closed for replies.

    1 reply

    ST Technical Moderator
    August 28, 2023

    Hello @MHast.11.

    Thank you for posting.

    I suggest that you consult this PDF AN5071 which describes the Power Modes features of the STM32WB Series.

    You can also take a look to the examples available under https://rb.gy/nw2hb .

    Thank you.

    Mahmoud.

    To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.