AnsweredAssumed Answered

Enter stop-mode from PVD interrupt

Question asked by adoxp on Oct 29, 2015
If i place my enter "stop code" into PVD interrupt I can enter stop mode but not exit. 

If i place the same code outside the PVD interrupt (in the while(1)) I can both enter and exit stop mode. 

I use STM32L053.

 if(PWR->CSR & PWR_FLAG_PVDO)
  {


  HAL_PWR_DisablePVD();
  pvd_config_vdd_rising();

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

  SystemClockConfig_STOP();

  }
  else
  {

  } 

Outcomes