STM32WB55 not going into Standby mode after Advertisement stops.
I am using following snippet after the BLE Advertisement stops. I am using p2pserver example in which BLE Advertisement stops after 60 seconds and I have a timer of 65 seconds in which I have following snippet.
HAL_SuspendTick();
SET_BIT(PWR->CR3,PWR_CR3_RRS); //RAM retention in standby mode (SRAMa);
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_STANDBY);
HAL_PWR_EnterSTANDBYMode();
But somehow i am getting 5 to 6 mA even after this snippet means it is not going into standby mode. I already made the configuration as follows:
/**
* keep debugger enabled while in any low power mode when set to 1
* should be set to 0 in production
*/
#define CFG_DEBUGGER_SUPPORTED 0
/**
* When set to 1, the traces are enabled in the BLE services
*/
#define CFG_DEBUG_BLE_TRACE 0
/**
* Enable or Disable traces in application
*/
#define CFG_DEBUG_APP_TRACE 0
Please guide me. Thanks in advance.