
M0A21/M0A23 Series
May 06, 2022
Page
337
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
6.10 PWM Generator and Capture Timer (PWM)
6.10.1 Overview
The chip provides one PWM generator. PWM supports 6 channels of PWM output or input capture.
There is a 12-bit prescaler to support flexible clock to the 16-bit PWM counter with 16-bit comparator.
The PWM counter supports up, down and up-down counter types. PWM uses comparator compared
with counter to generate events. These events are used to generate PWM pulse, interrupt and trigger
signal for ADC to start conversion.
The PWM generator supports two standard PWM output modes: Independent mode and
Complementary mode. They have different architecture. In Complementary mode, there are two
comparators to generate various PWM pulse with 12-bit dead-time generator. For PWM output control
unit, it supports polarity output, independent pin mask and brake functions.
The PWM generator also supports input capture function to latch PWM counter value to the
corresponding register when input channel has a rising transition, falling transition or both transition is
happened. Capture function also support PDMA to transfer captured data to memory.
6.10.2 Features
6.10.2.1 PWM Function Features
Supports maximum clock frequency up to 48 MHz
Supports up to one PWM module and provides 6 output channels
Supports independent mode for PWM output/Capture input channel
Supports complementary mode for 3 complementary paired PWM output channel
–
Dead-time insertion with 12-bit resolution
–
Two compared values during one period
Supports 12-bit prescaler from 1 to 4096
Supports 16-bit resolution PWM counter
–
Up, down and up-down counter operation type
Supports mask function and tri-state enable for each PWM pin
Supports brake function
–
Brake source from pin and system safety events (clock failed, Brown-out detection
and CPU lockup)
–
Noise filter for brake source from pin
–
Edge detect brake source to control brake state until brake interrupt cleared
–
Level detect brake source to auto recover function after brake condition removed
Supports interrupt on the following events:
–
PWM counter matches 0, period value or compared value
–
Brake condition happened
Supports trigger ADC on the following events:
–
PWM counter matches 0, period value or compared value
6.10.2.2 Capture Function Features
Supports up to 6 capture input channels with 16-bit resolution
Supports rising or falling capture condition