Datasheet

DocID8349 Rev 7 77/170
ST7LITE20F2 ST7LITE25F2 ST7LITE29F2 On-chip peripherals
169
Figure 36. PWM function
Figure 37. PWM signal from 0% to 100% duty cycle
Output compare mode
To use this function, load a 12-bit value in the DCRxH and DCRxL registers.
When the 12-bit upcounter (CNTR) reaches the value stored in the DCRxH and DCRxL
registers, the CMPF bit in the PWMxCSR register is set and an interrupt request is
generated if the CMPIE bit is set.
Note: The output compare function is only available for DCRx values other than 0 (reset value).
Break function
The break function is used to perform an emergency shutdown of the power converter.
The break function is activated by the external BREAK pin (active low). In order to use the
BREAK pin it must be previously enabled by software setting the BPEN bit in the BREAKCR
register.
When a low level is detected on the BREAK pin, the BA bit is set and the break function is
activated.
Duty cycle
register
Auto-reload
register
PWMx output
t
4095
000
With OE=1
and OPx=0
(ATR)
(DCRx)
With OE=1
and OPx=1
Counter
COUNTER
PWMx output
t
with OEx=1
and OPx=0
FFDh FFEh FFFh FFDh FFEh FFFh FFDh FFEh
DCRx=000h
DCRx=FFDh
DCRx=FFEh
DCRx=000h
ATR= FFDh
f
COUNTER
PWMx output
with OEx=1
and OPx=1