It is because it would have to recalculate the duty cycle for all channels, the information is not stored in the driver but only into the comparator registers. It would be possible to scale the values into the comparators but there would be issues with rounding or truncation.
I understand the point, if the aim is only to re-configure the pwm after start, no problem.
The setting is effective starting next cycle so there should be the time to re-enable the channels too, depending on when the change is started.
be careful, when the timer is drived to max frequency, if the update fall near the wrap point of ARR, could happen a wrong update of one cycle.
I think that both new values, pwm frequency and duty, ​​must be prepared in advance and that the update must be done in the most possible atomic way
Uhm, about the fixed time-on, is it a good idea to assume it as default for variable frequency mode? .
Yes, in my experience, fixed "on time" is the default mode when variable frequency is used. The ARR value (pwm pweriod) span from comparator value (on time) +1 to 0xFFFF
supporting this mode would be simple
yes, when, in a few days, I will try the new driver features, i will also test a variable frequency routine
IMO, define the value of pwm cycle as frequency is generally a most commonly used term than pwm period, it might be better than the control function set the frequency and then add one or more macro to allow the input value as period (nS/uS/mS as input units)
Alberto