2026-01-21 5:25 AM
I am trying to get wake-up from HALT mode working on the STM8L151 using the RTC, but without success. I tried two approaches:
Neither approach was successful — once the MCU enters sleep, it no longer wakes up. I have the feeling that the issue is not so much directly in main and in the CLK + RTC configuration, but rather in the ISR, IQR handling setup. At this point, however, I’m not sure what to add, what to check, or in which files (stm8_interrupt_vector.c, stm8l15x_itc.c,....).
I would be very grateful if someone could advise me on what belongs where, so that I can understand the entire interrupt chain and which additional files in the Inc directory need to be adjusted. In parallel, I also have several related follow-up questions:
I am using STM8L15x_StdPeriph_Driver (downloaded from ST as STSW-STM8016 version 1.6.2) — is this version up to date?
In the examples, there are some related to this topic, but they contain the files stm8l15x_it.h and stm8l15x_it.c. However, I don’t see these files in my basic Inc directory, nor do I see them being included in the main file of the example. So the example didn’t really help me…
My goal is to achieve a setup where the device wakes up regularly every minute. With regard to further development, I would prefer a solution based on the RTC Alarm, where I would also have the current time available, but this is not a strict requirement.
I am using STVD and the latest Cosmic compiler.
Thank you very much for your help. Petr