SN32F260 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 63
Version 1.5
6.6.2 PWM Mode 2
PWMn is 1 when TC<MRn during Up-counting period.
Take Edge-aligned up-counting Mode as example,
1.
All single edge controlled PWM outputs go HIGH at the beginning of each PWM cycle (timer is set to zero) unless
their match value in CT16Bn_MR0~3 registers is equal to zero.
2.
Each PWM output will go LOW when its match value is reached. If no match occurs, the PWM output remains
continuously HIGH.
3.
If a match value larger than the PWM cycle length is written to the CT16Bn_MR0~3 registers, and the PWM
signal is LOW already, then the PWM signal will go HIGH on the next start of the next PWM cycle.
4.
If a match register contains the same value as the timer reset value (the PWM cycle length), then the PWM output
will be reset to HIGH on the next clock tick. Therefore, the PWM output will always consist of a one clock tick wide
low pulse with a period determined by the PWM cycle length.
5.
If a match register is set to zero, then the PWM output will go LOW the first time the timer goes back to zero and
will stay LOW continuously.
CT16Bn_MR0=60
0
100 (TC resets)
60
25
CT16Bn_MR1=25
PWM0
PWM1
CT16Bn_MR2=100
PWM2
CT16Bn_TC
Note:
When the match outputs are selected to perform as PWM outputs, the timer reset (MRnRST) and
register must be set to zero except for the match
register setting the PWM cycle length. For this register, set the MRnR bit to one to enable the timer
reset when the timer value matches the value of the corresponding match register.