Skip to main content
SChan.8
Associate II
March 4, 2021
Question

Shutdown mode wakeup does not works in STM32WB

  • March 4, 2021
  • 0 replies
  • 693 views

Hi,

I am using STM32WB55CG nucleo board. I wrote a program as follows.

  1. Reset the device
  2. run BLE sequencer for 1 minute ( advertise BLE for i minute)
  3. read the time and date
  4. save the time and date in flash
  5. enter shutdown mode
  6. Wakeup from shutdown mode (using RTC wakeup) in every 10s and execute 3,4 and 5 steps

shutdown mode wake up does not works. But when I remove the second step in the program wakeup is working. After integrating the BLE in to the code wakeup does not works. My program as follows. Can anyone help me ?

 if( (__HAL_PWR_GET_FLAG(PWR_FLAG_C2SB) == RESET)

    )

   {

APPE_Init();

       BLE_MODE =1;

   }

while(BLE_MODE){

UTIL_SEQ_Run(~0);

if(HAL_GetTick()>60000){

BLE_MODE=0;

}

}

while(1){

HAL_RTC_GetTime(&hrtc, &time_struct_t, RTC_FORMAT_BIN);

HAL_RTC_GetDate(&hrtc, &date_struct_t, RTC_FORMAT_BIN);

temperature_value = Get_Temperature();

log_data(date_struct_t,time_struct_t,temperature_value);

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_SET);

HAL_Delay(20);

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0, GPIO_PIN_RESET);

Enter_shutdownMode();

}

This topic has been closed for replies.