STM32L4 power consumption reduction
Hi,
I've created a PCB with an STM32L4x6 microcontroller and several peripherals, mainly I2C. I want to sample data at 512Hz using the internal ADC. The original plan was to configure the ADC with DMA and a timer, I'd put the MCU into other low-power states and wake up to DMA interrupt. However, I've encountered a problem in implementing this. Using 'Sleep' mode with RTC wake-up works, but power consumption decrease only with ~300uA, which is not ideal. The 'STOPX' mode doesn't work with the ADC.
I've tried reducing the clock frequency; currently, the MCU is running at 4MHz because I perform FFT calculations and other tasks after sampling, which would be too time-consuming at a lower clock speed within a 1-second timeframe.
I thought about increasing the clock speed during calculations and then reducing it, but I'm not sure how to execute this without affecting the ADC, DMA, and timer.
My question is, how can I efficiently achieve the following:
- ADC sampling at 512Hz DMA+Timer?
- Modifying the clock frequency while the ADC is sampling.
- Any other suggestions for improving energy efficiency in this setup?
Thank you for any help :)
Best regards,
Lorant
