Low Power Mode in STM32WB
I am using STM32WB for My Application, I want to initailly mcu is stop mode or sleep mode,when external interrupt (switch) is triggered its wakeup from low power mode.After wake up re-installize the System Clock for Mcu running configured clock frequency.
In my case its working well without configure STM32_WPAN (BLE) in STM32Cube Mx, When ever i use both Stop mode and BLE its not working while wakeup trigger is applied.
I tried all the ways of Sleep, Stop and Shutdown mode ,all are gives same response.I hope you understand my problem and give suggestion.
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Config code for STM32_WPAN (HSE Tuning must be done before system clock configuration) */
MX_APPE_Config();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* Configure the peripherals common clocks */
PeriphCommonClock_Config();
/* IPCC initialisation */
MX_IPCC_Init();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_RTC_Init();
MX_LPUART1_UART_Init();
MX_TIM1_Init();
MX_RF_Init();
/* USER CODE BEGIN 2 */
HAL_PWREx_EnterSHUTDOWNMode();
SystemClock_Config();
HAL_TIM_Base_Start_IT(&htim1);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
if(gWakeupFlag==1)
{
if(gInitFlag==0)
{
MX_APPE_Init();
gInitFlag=1;
}
MX_APPE_Process();
}
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
