2021-03-22 04:05 AM
Hello,
For my project, I would like to enter and exit from stop mode. My intended application would be something like, the processor should wait for 1 or 2 minutes with RTC Alarm and it should wakeup if ther is any external interrupt or if there is no external interrupt then it should come out of RTC alarm handler.
If anybody is facing the similar issue, please write me on this issue as soon as possible.
2021-03-22 04:25 AM
Hi @JHemb.1
You can refer to RTC alarm example provided in STM32CubeF1 firmware via this path STM32Cube\Repository\STM32Cube_FW_F1_V1.8.3\Projects\STM32F103RB-Nucleo\Examples\RTC
Also, you can refer to application note AN2629 "STM32F101xx, STM32F102xx and STM32F103xx low-power modes"
Bouraoui
2021-03-22 05:19 AM
Hello Mr. Chemli,
Thank you so much for your quick reply. I have seen the application note, AN2629 and I feel I am implementing similar. If possible, could you please help me to solve my problem, my code looks like this :
HAL_SuspendTick();
__HAL_RCC_PWR_CLK_ENABLE();
/*** enable sleep on exit for interrupt only operations ****/
HAL_PWR_EnableSleepOnExit();
/*** ENTER THE STOP MODE ****/
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
Inside, this function, there is another funciton called __WFI(); and when the compiler reaches this point, it gives me Hardfault_Handler(), could you please tell me what could be the error ?
2021-03-22 08:33 AM