STM32L073RZ unable to enter sleep mode with STM32CubeIDE, but works in Keil.
Hello All,
I am very worried about this as time is short.
I am attempting to get my STM32L073RZ into low power mode using STM32CubeIDE version 19, and it wakes as soon as it sleeps. I am wondering if this is a problem with my code, or possibly an issue with the STM32CubeIDE?
I am attempting sleep mode like so:
void Enter_Stop_Mode(void)
{
ConsolePrintf("Preparing to enter Stop mode\r\n");
// Clear Wake-Up flag
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);
ConsolePrintf("RTC Wake-Up flag cleared\r\n");
// Enter Stop mode (low-power mode)
ConsolePrintf("Entering Stop mode\r\n");
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
ConsolePrintf("Exited Stop mode\r\n");
}
And this fails. Am I the only one experiancing this, how have others got this working?
Are there any examples I could go off of?
For more context, here is my repo: https://github.com/CropWatchDevelopment/tempSensorx2
If anyone could help, I would be very greatful.
-Kevin
