Question
STM32L151CBT6A MCU, Enter stop mode have biggest power consumption - above 960uA, but datasheet is ~2..10uA ? And MCU not wake up from STOP by RTC WKUP
Code of main cycle:
// Some "works"...
ipf("Works 5 sec\n\r");
HAL_Delay(5000);
// Prepare...
ipf("Power save STOP mode 5 sec\n\r");
double CounterVal = 5000 * 2.3125;
if (HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, (uint32_t)CounterVal, RTC_WAKEUPCLOCK_RTCCLK_DIV16) != HAL_OK)
{
Error_Handler();
}
HAL_SuspendTick();
// Enter STOP
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
// Exit, reconfig clocks & resume tick timer
SystemClock_Config();
HAL_ResumeTick();LSI used by 37.0 KHz.
1. After HAL_PWR_EnterSTOPMode CPU goes to STOP, but POWER consumption ~960uA, why??
2. Why MCU not wakeup from RTC WKUP? Interrupt does not works...