STM32WB5MMGHx when on STOP Mode 2 keeps advertising
I’m using a STM32WB5MMGHx module on a battery powered device. I need to put the module in Stop mode 2 in order to have a better battery life. After reset when the module enters the stop mode for the first time it stops advertising as it should. After waking up when the module returns to stop mode again the advertisement keeps being active. I need the module to stop advertising every time it enters Stop Mode 2.
I’m using HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI) to enter stop mode 2.