6 years, 11 months ago.

reduce frequency depending on sampling rate of sensor

Hello, I am working on stm32l073 custom board with external oscillator of 8 Mhz. I had 3 –axis sensor interfaced in spi mode. I would like to develop a battery operated device which has to consume very low current. I got to see that more the frequency more is the power consumption. My data rate from ADXL sensor starts from 1 sample/sec till 3200. For 1 sample per second I don’t require 8 Mhz of frequency for higher data rates this is ok. For low date rate the power consumption is higher. Now I would like to implement in such a way that depend on the sampling rate initiated by user the application must switch to low freqencies when required. Is there any solution how do I switch at run time as per above mentioned. If there is any code snippets you give me few pointers so that I can implement.

1 Answer

6 years, 11 months ago.

http://www.embedded.com/design/power-optimization/4237635/Understanding-MCU-sleep-modes-and-energy-savings

This article is geared towards the EFM line of devices which is now Silabs but the concepts are still relevant to your STM32 CPU.

https://community.st.com/thread/40538-how-to-reach-stm32l073rz-optimal-energy-consumption

https://community.st.com/thread/34371-what-could-be-consuming-power-in-stop-mode-after-flashing-an-stm32l073

Are you using USB with your product ? If yes, then the external clock source is important to support USB unless the CPU can function with USB without an external clock - need to check the datasheet to confirm this feature.

For the slower sensor samples, consider to use the internal RC clock.

https://developer.mbed.org/questions/68607/STM32-Underclocking-for-energy-saving/

https://developer.mbed.org/questions/7117/How-to-increase-clock-frequency-on-STM32/