st7pmc2s6 STMicroelectronics, st7pmc2s6 Datasheet - Page 254

no-image

st7pmc2s6

Manufacturer Part Number
st7pmc2s6
Description
8-bit Mcu For Automotive With Nested Interrupts, Flash, 10-bit Adc, Brushless Motor Control, 5 Timers, Spi, Linsci?
Manufacturer
STMicroelectronics
Datasheet
On-chip peripherals
254/371
PWM operating mode
The PWM generator can work in center-aligned or edge-aligned mode depending on the
CMS bit setting in the MPCR register.
Figure 119
It offers also an 8-bit mode to get a full 8-bit range with a single compare register write
access by setting the PMS bit in MPCR register.
The comparisons described here are performed between the PWM counter value extended
to 13 bits and the 13-bit compare register. Having a compare range greater than the counter
range is mandatory to get a full PWM range (that is, up to 100% modulation). This principle
is maintained for 8-bit PWM operations.
Center-aligned mode (CMS bit = 1)
In this operating mode, the PWM counter counts up to the value loaded in the 12-bit
compare 0 register then counts down until it reaches zero and restarts counting up.
The PWM signals are set to ‘0’ when the PWM counter reaches, in up-counting, the
corresponding 13-bit compare register value and they are set to ‘1’ when the PWM counter
reaches the 13-bit compare value again in down-counting.
Figure 119. Counting sequence in center-aligned and edge-aligned mode
If the 13-bit compare register value is greater than the extended compare 0 register (the 13
bit is set to ‘0’), the corresponding PWM output signal is held at ‘1’.
If the 13-bit compare register value is 0, the corresponding PWM output signal is held at ‘0’.
Figure 120
compare 0 register value = 8.
Center-aligned mode
Edge-aligned mode
shows the corresponding counting sequence.
shows some center-aligned PWM waveforms in an example where the
ST7MC1K2-Auto, ST7MC1K6-Auto, ST7MC2S4-Auto, ST7MC2S6-Auto
0
0
T = PWM period, value of 12-bit compare 0 register = 16
1
1
2
2
T
.....
....
15
15
T
16
16
15
0
....
1
.....
2
16
1
0
0
1
1
th

Related parts for st7pmc2s6