2018-04-04 08:30 AM
Hello
I have a STM32L4 MCU in my coming product. I'm running a master timer at 500Hz. The master timer triggers four other timers. All of these timers drive PWM at 500Hz at different phase. (Cannot be done using single multi-channel timer) These need to be precisely in sync.
I can implement the slave timers in two ways:
1. Set up them as single shot timers, in which case the master timer triggers them every 2ms. Or
2. Let the master timer trigger the slaves when it's started and let all the timers run as long as needed.
The question is: Does the single shot configuration save any power, as the slaves are not running for some 50% of the time, since the PWM burst is quite fast?
I have no means to measure the current consumption so precisely, yet. Therefore I'm asking whether someone could tell the answer.
#timer #stm32l4 #power-consumption #pwm2018-04-04 09:13 AM
Does the single shot configuration save any power
Probably yes - as you've said, the timers won't run all the time - but the net effect may be too small to be noticed in the total consumption. You may want also to investigate impact of prescaler, if the application can afford using it.
You'll definitively need to benchmark.
JW
2018-04-04 12:14 PM
Sure. I'll do the measurements when possible. It's good that the choice between these two alternatives can be made in SW.