2025-01-10 10:21 AM
Hi guys, im initializing a low/ultra low power project and i will use the STM32C011J4M6, i need to know if a general purpose timer like the TIM14 can wakeup the microcontroller in the low power modes (sleep, stop, etc).
I was reading the datasheet (i haven't read it all yet), and i didnt find my answer, i went to write the code to try and see what would work and I couldn't implement it in stop or sleep mode.
Something strange also happened, when I put only it to sleep and flashing an led worked normal when connected to STlink, but when I put it in an external source to measure the current, it seemed that the flash "went off" (it didn't perform what it was running before, even with the power at 3.3v.) can anyone answer me what would that be?
Anyway, my project will be a loop of a simple ADC reader, basically, what im trying to do is:
Power on > sleep > timer interrupt > wakeup > ADC read > if adc read is bigger than X > activate a pin > else > sleep.
If you have a sugestion to me please send, but I need the interruption to be internal, nothing external. Thanks everywhone
2025-01-10 10:46 AM
RTC+LSE would be typical to turn off the processor, peripherals and pins.
Watch for static loads on pins drawing current.
Usually you'd WFI (wait for interrupt) for the processor to stop running code, whilst still powering the peripherals to keep running.
2025-01-10 10:57 AM
The Power Controller training slides STM32C0 Online Training - STMicroelectronics provide an introduction to the power saving modes. Timers keep running in Sleep Mode (where only the CPU clock stops), but not in deeper power saving modes. You might use RTC or IWDG as wakeup sources in those modes. Anyway, for an ultra low power project, you should look into U0/U5/... ultra low power series.
hth
KnarfB