NXP’s “SCTimer/PWM” module provides typical timer features such as counters, match/compare registers and input/output control. The usage of these features is extended by defining events and actions, in combination with a programmable state machine. These enhancements allow detailed control over the behavior of the module. Events can be inputs, outputs, matches, or combinations of these signals. Actions are taken to control the counter, the I/O ports, as well as interrupt flags or DMA transfers. The state machine defines the context in which events are evaluated, and how these resources behave from one event to the next. Simple timer operations such as periodic interrupt or frequency generation require only the events and actions to be defined. A state machine benefits the user by adding the ability to change behaviors in response to a user-defined condition, for example an abort trigger causing a PWM to be idled.