I’m working on a project that involves monitoring vehicle data using an STM32L4 microcontroller and Mbed OS. The idea is to keep the power consumption really low since the system needs to stay in the car and run off the battery long-term.
I want the microcontroller to go into deep sleep and wake up every 10 seconds — probably using either the RTC or a low-power timer. I’ve tried a few things like ThisThread::sleep_for() and LowPowerTimer, but not sure which is actually best for keeping power usage down without affecting performance.
If anyone has experience with this kind of setup, I’d really appreciate some pointers:
- What’s the best way to handle periodic wake-ups in deep sleep using Mbed OS?
- Is LowPowerTicker better than using the RTC interrupt?
- Also, any tips for shutting off unused peripherals or GPIOs before going to sleep?
Any help would be great — cheers in advance!