Skip to main content
SYun.2
Associate II
Sep 7, 2021 9:03 AM UTC
Question

rebooting in standby mode.

Hello, I am developing STM32L072.

The library is using ""I CUBE LRWAN".

Inside the library, I have created the part that enters the OFF mode (STANDBY mode.

But the MCU doesn't consider the RTC and just keeps rebooting.

What else should I consider?

void PWR_EnterOffMode(void)

{

 /* USER CODE BEGIN EnterOffMode_1 */

UTILS_ENTER_CRITICAL_SECTION();

 if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET)

 {

  /* Clear Standby flag */

  __HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB); 

 }

DBGMCU->CR = 0;

/*SX1276 DEINIT*/

 Sx_Board_IoDeInit();

Gpio_PreInit();

Gpio_STOP_PowerHold_Init();

 HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);

 HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x2616, RTC_WAKEUPCLOCK_RTCCLK_DIV16);

/* Clear all related wakeup flags */

 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);

 /* Enter the Standby mode */

 HAL_PWR_EnterSTANDBYMode();

UTILS_EXIT_CRITICAL_SECTION();

 /* USER CODE END EnterOffMode_1 */

}

This topic has been closed for replies.

3 replies

Peter BENSCH
ST Technical Moderator
Sep 7, 2021 9:17 AM UTC

Please check SYSTICK whether it is deactivated, otherwise it fires continuously with an interrupt every 1 ms.

Regards

/Peter

In order 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.
SYun.2
SYun.2Author
Associate II
Sep 7, 2021 10:00 AM UTC

Thanks for the reply.

But I don't think this is enough.