2020-07-06 09:12 AM
According to STM32L052K8 datasheet in table 39 page 72 of this document:
https://www.st.com/resource/en/datasheet/stm32l052k8.pdf
Those timers consume uA/MHz:
Peripheral | Range 1 | Range 2 | Range 3 | Low-power sleep and run
LPTIM1: 10, 8.5, 6.5, 8
TIM6: 3.5, 3, 2.5, 2
So TIM6 consumes about 3-4 time less current then so called LowPowerTimer???
Of course I understand that LPTIM can run in Stop mode where TIM6 can not but for all other purposes I should use TIM6 then?
I also can not understand the table: there is power consumption for each of voltage regulator range and what means the fourth column "low-power sleep and run"? For example Im running my project in Range 3 in LowPower-Run. I should add those two columns or what?
What about SysTick power consumption? It is 24bit timer I would like to use but I can not find any data on power consumption.
2020-07-06 01:26 PM
LPTIM is LP mostly because it can serve the lower-power modes of mcu when peripheral clicks are completely off, thanks to its asynchronous nature (pending of course an appropriate application). Running it out of the same internal clock as TIM6 won't give it this edge.
As the dynamic power consumption friend on the number of transistors switching, it depends on the particular configuration of given peripheral. TIM6 is a rather feature-constrained peripheral, compared even to LPTIM. So yes, given both a maximal setup, it can consume more. It's not necessarily the case of your application, so you should take the datasheet value more as a guideline and run your own benchmarks.
SysTick is integral part of the processor core, so it doesn't get to be characterized separately. It's very simplistic so I wouldn't expect it to have a much different consumption fron TIM6 (which at the end of the day is effectively a 32bit counter, considering the prescaler too).
JW
2020-07-08 12:38 AM
@Community member Ill make my own test when I have setup ready. Especially Im interested in Systick because I did not found any documents on power consumption in ARM infocenter. TIM6 is not 32 bit timer it is 16 bit timer. I need to count microseconds so prescaler is setup to do so. 16bit wraps up in 65 miliseconds which is very short for battery operation because uC need to wakeup only to increment the variable. Normally I would cascade two timers but this will increase power consumption. Systick is interesting because it is 24bit which wraps up every 16 seconds. So I do not agree on TIM6 statement it is 32bit including prescaler because it is storing only 16bit value any moment.
2020-07-08 05:31 AM
> I did not found any documents on power consumption in ARM infocenter
ARM does not manufacture chips. The consumption depends on the chip making process.
As it's part of the processor, you won't be able to run it unless processor runs. Processor's consumption will be orders of magniture higher than systick's alone.
> TIM6 is not 32 bit timer it is 16 bit timer.
I did not say it's a 32-bit *timer*, but that it's an effectively 32-bit *counter*. I wrote that in context of consumption, i.e. that its consumption will be higher than SysTick's .
JW