PWM Generator pauses whenever values are changed?

I’ve often see a problem with the .netmf framework in that whenever I change the PWM frequency or duty cycle for one channel, all the other channels pause and then return. In some bizarre cases all the channels take the values of the last PWM channel to be set.

Does anyone know what causes that?

Giving actual examples of boards where you see that might help - and a simple test app and capture from an o’scope if you have one (I don’t)

Remember, some of the micros in use have only a single PWM frequency setting for the multiple PWM outputs, so that’s relatively easy to explain away. The duty cycle change though I would expect to have no similar limitations.

There have been recent threads discussing a PWM change causing a “glitch” to the pulse train when the PWM peripheral doesn’t change settings at the end of a current pulse, perhaps these are all related, when a PWM change is initiated the PWM timer is reset throwing all PWM streams that depend on it out of whack.

(so really I am thinking this is all potentially a hardware limitation so the framework may not be able to address it)

I believe I remember something like this back in the USBizi days. It had (if I remember) something to do with instructing the hardware to end the pulse only during a 0. For USBizi, it was simply a hardware setting that needed to be enabled. It might be similar for the STM32 hardware.

i KNOW i have seen this before in a topic, with a explanation and workaround, so using the correct search parameters should get you the answer :slight_smile: