2023-02-24 05:34 AM
2023-02-24 06:41 AM
I'm not an expert with the STM8 cards but I think you could have a look at the Timers on the board (16 bit ones) and their interrupts. You could setup the timer, enter in low power mode, and wake up from the low power mode when the interrupt is triggered.
I assume that you could prescale the clock of the timer low enough to obtain a 15 minutes countdown but it might have precision issues depending on the input clock.
2023-02-24 06:50 AM
For newer designs perhaps consider parts with an RTC
2023-02-24 07:06 AM
...e.g. the STM32C011F4, whose family was recently launched as the successor to the STM8S already set on NRND. Its RTC can easily be programmed to wake up every 15 minutes, which has already been discussed here in the community several times.
Good luck!
/Peter
2023-02-24 08:25 AM
Hi, Krashoup
Your solution is good but it is only possible with the "wait mode" that has a minimum consumption more than double of the "active halt mode" that is my desired mode, if possible.
Anyway, your sugested solution will be tested against others.
Thank you for your answer.
2023-02-24 08:32 AM
Hi, Tesla DeLorean
Yes, in the future, for this kind of project a RTC will be very helpfull, but at this momente I only have a bunch of STM8S103 that I want to use.
Thank you for your answer
2023-02-24 08:40 AM
Hi, Peter BENSCH
Very good to know about the STM32C011F4.
I will definitely review it for my future projects.
Thanks for your response.
2023-02-24 08:55 AM
I think the better solution at this moment is enter in "active halt mode" with a AWU time of 30 seconds and repeat the AWU interrupts 30 times before do anything.
I will wait a little more to see if is there another better solution.
Thank you everyboddy.
2023-02-24 09:15 AM
Your slowest clock and largest divider/prescaler will determine the maximum length of time between waking cycles. You'll then need to mark off time in those units.
I know you have parts, but if this is a more commercial design the long-term availability is questionable.
2023-02-24 09:38 AM
Right, for the "active halt mode" the maximum lenght of time, according with the Reference Manual RM0016 page 116 Table 25, is only 30.720s so if I choose this solution I have to wait 30 AWU interrupts to perform 15 minutes.
At this moment this is only a experimental project.
Thank you.