marti159 wrote:
How is it on STM32F103C8T6? Lower frequency = lower power consumption?
How can I decrease frequency? Now I have blue pill with 8.0MHz crystal and ticks at 72MHz. Is possible to set frequency to for example 2 or 8 MHz instead of 72MHz? Can I use 8MHz crystal an reduce frequency in software like fuses on Atmel AVR? Is there any minimal frequency?
Be aware that lowering the clock frequency may not save as much power as you might think. The reason for this is that if you perform a particular task at regular intervals, then performing that task quickly and then sleeping may use the same amount of energy as performing the task slowly and then sleeping. In fact, in many cases you actually perform things more efficiently if you run the processor faster and sleep longer, as you then have the advantage of leaving peripherals and external circuitry (your radio for example) on for shorter periods than you would if you performed the task slowly.
You will need to think carefully about this, and it may only be by experimentation that you determine the best regime for maximum battery life for your particular use case.
... Is there any minimal frequency? ...
In theory you can run from the 32kHz watch crystal if fitted, or the internal 32kHz R/C source.
These may be too slow to allow you to transmit your data however.
I suspect that with care, you can run the blue pill at 72MHz, and, if only waking up for a few mS every event, and with events only occurring up to 10 times per minute, I would suggest that a relatively modest battery will last almost as long as its self discharge rate, i.e. several years.
In my experiments, I managed to get results that suggested a single 18650 LiPo (around 2000mAh) would last for several years, so long as the STM32F103 completed its task quickly and therefore slept as much as possible. As it happens, the on board power LED was consuming a significant amount of power in my experiments, and removing it would be a serious suggestion, assuming your soldering fu is up to the task.
You may find my Sunrise and Sunset timer project of interest as it also contains some insights into the use of the low power modes of the STM
http://stm32duinoforum.com/forum/viewtopic.php?f=19&t=380