RTEMS  5.1

The PWM driver provides the interface to configure and use the PWM peripheral.

The PWM macrocell controls square output waveforms of 4 channels. Characteristics of output waveforms such as period, duty-cycle, dead-time can be configured.
Some of PWM channels can be linked together as synchronous channel and duty-cycle of synchronous channels can be updated by PDC automatically.

Before enabling the channels, they must have been configured first. The main settings include:

After the channels is enabled, the user must use respective update registers to change the wave characteristics to prevent unexpected output waveform. i.e. PWM_CDTYUPDx register should be used if user want to change duty-cycle when the channel is enabled.

For more accurate information, please look at the PWM section of the Datasheet.

Related files :
pwmc.c
pwmc.h.