cancel
Showing results for 
Search instead for 
Did you mean: 

High current in stop 2 mode after BLE deactivation

Jeremiah
Associate

Hi,

I am using a custom board based on P-NUCLEO-WB55 and started working from the example code BLE_p2pServer.

 

The board will normally be in stop2 mode and will check for pushbutton press every 1 second. The current consumption is around 10 uA in this state.

 

If push button is pressed for 3 or more seconds. The board enters the BLE mode. It is advertising the packets for a set time of 5 minutes. After 5 minutes I am exiting from the while loop. I am trying to stop the BLE mode and go to stop2 mode and continue the previous operation. 

Once i enter the BLE mode and exit out of BLE mode the current consumption is now 100uA. All other functionalities are working properly. If I press the push button for 3 seconds, The board enters BLE and starts advertising. I am trying to find out what is causing this increase in current. I don't want to reset the board every time I enter BLE mode. This is the following procedure I am using to exit out of BLE mode.

 

hci_reset();
HAL_Delay(100); 

SHCI_C2_Reinit();

LL_C2_AHB3_GRP1_DisableClock(LL_C2_AHB3_GRP1_PERIPH_IPCC);

MX_IPCC_DeInit();

HAL_NVIC_DisableIRQ(HSEM_IRQn);
__HAL_RCC_HSEM_CLK_DISABLE();

LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);

and I am using this to enter stop 2 mode.

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, SLEEP_MODE_DURATION, RTC_WAKEUPCLOCK_RTCCLK_DIV16);
HAL_SuspendTick();


/* Enter STOP 2 mode */
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
/* ... Stop 2 mode ... */


/* Resume SysTick */
HAL_ResumeTick();

 

Is my procedure correct and do I have to set any values differently to achieve the 10 uA current in my normal operating mode. Please help me to resolve this issue

 

0 REPLIES 0