Hello I am working on lora e5 mini dev board with this example
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
This file has been truncated. show original
Now I want to put my device into shutdown mode with following code but it restarts repeatly
MX_LoRaWAN_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop /
/ USER CODE BEGIN WHILE */
HAL_PWREx_EnterSHUTDOWNMode();
while (1)
{
/* USER CODE END WHILE */
MX_LoRaWAN_Process();
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
Can anyone help me? Best Regards
1 Like
The HAL_PWREx_EnterSHUTDOWNMode()
function should enter the shutdown mode correctly. However, if the device is restarting, it can be due to an external or internal wake-up source being triggered.
I disabled rtc interrupt with following code part but it did not worked HAL_NVIC_DisableIRQ(TAMP_STAMP_LSECSS_SSRU_IRQn);
HAL_NVIC_DisableIRQ(RTC_Alarm_IRQn);