SN32F100 Series
32-Bit Cortex-M0 Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 77
Version 1.9
6.6 PWM
1.
All single edge controlled PWM outputs go LOW 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 HIGH when its match value is reached. If no match occurs, the PWM output remains
continuously LOW.
3.
If a match value larger than the PWM cycle length is written to the CT16Bn_MR0~3 registers, and the PWM
signal is HIGH already, then the PWM signal will be cleared 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 LOW on the next clock tick. Therefore, the PWM output will always consist of a one clock tick wide
positive 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 to HIGH the first time the timer goes back to zero
and will stay HIGH continuously.
CT16Bn_MR0=60
0
100 (TC resets)
60
25
CT16Bn_MR0=25
PWM0
PWM0
CT16Bn_MR0=100
PWM0
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.