2021-03-22 04:10 AM
Hello,
I enter stop mode using HAL_PWR_EnterSTOPMode and the processor come out of this function immediately and does not wait for any external interrupt. can someone help me on this?
Solved! Go to Solution.
2021-03-22 01:34 PM
I had examples on the F1 a decade ago, kind of moved on since then.
You might want to glance over the assorted examples in the CubeF1 trees
STM32Cube_FW_F1_V1.8.2\Projects\STM32F103RB-Nucleo\Examples\RTC\RTC_Alarm
STM32Cube_FW_F1_V1.8.2\Projects\STM32VL-Discovery\Examples\PWR\PWR_SLEEP
STM32Cube_FW_F1_V1.8.2\Projects\STM32VL-Discovery\Examples\RTC\RTC_LowPower_STANDBY
2021-03-22 06:18 AM
Hello @JHemb.1 ,
Without entering stop mode, does the interrupt trigger?
Make sure to use latest release of STM32CubeF1 MCU package, and have a look to the errata sheet related to the STM32F103 devices, to check if you have the same conditions as described:
Please keep me informed about your progress on this.
Imen
2021-03-22 08:38 AM
It doesn't have to be an external interrupt, could be any interrupt, so SysTick or whatever.
Also probably not something you want to single-step in a debugger.
Look at what's actually FAULTING, is it some other interrupt with expectation of structures being set up? A missing handler for a different interrupt, EXTI, RTC, or whatever?
2021-03-22 09:47 AM
Hello ,
Thank you so much for your reply. We are using the stop mode and your solutions works for sleep mode. I want to wait for an interrupt when I enter HAL_PWR_EnterSTOPMode function. But I am not successfull in achieving this.
2021-03-22 12:53 PM
Hello,
Thank you so much for your reply. In our case it is an external interrupt on pin PA10. My application should be like, When I am waiting for 2 or 3 minutes, then it should goto a Timer/RTC Alarm IRQ handler,
When we press the button on PA10, it should come out of the stop mode and also simultaneously come out of the IRQ handler.
Could you please provide any sample code or any reference which has a sample implementation?
2021-03-22 01:34 PM
I had examples on the F1 a decade ago, kind of moved on since then.
You might want to glance over the assorted examples in the CubeF1 trees
STM32Cube_FW_F1_V1.8.2\Projects\STM32F103RB-Nucleo\Examples\RTC\RTC_Alarm
STM32Cube_FW_F1_V1.8.2\Projects\STM32VL-Discovery\Examples\PWR\PWR_SLEEP
STM32Cube_FW_F1_V1.8.2\Projects\STM32VL-Discovery\Examples\RTC\RTC_LowPower_STANDBY