Pwm Signal Control; Figure 7. Comp2 With Output Redirection Feature; Figure 9. Pwm Signal Control: Comp2 Output Redirection To Timer - STMicroelectronics AN3248 Application Note

Stm32l15xxx analog comparators
Table of Contents

Advertisement

PWM signal control

4
PWM signal control
In STM32L15xxx devices, the COMP2 output can be redirected to the output compare
reference clear signal (OCREFCLR) of the embedded timers: TIM2, TIM3, and TIM4 (refer
to
Figure 7: COMP2 with output redirection
COMP2 output can be used to provide a fast response time that is independent from the
system frequency when an analog event occurs. This application case controls a PWM
signal for motor control when the current sensor output is connected to the COMP2 non-
inverting input. In this situation, the reference voltage is connected to the COMP2 inverting
input. When the current sensor output exceeds the selected threshold, the COMP2 output
goes high and the PWM signals switch to safe state.
Figure 9.
1. In the pulse width measurement application, COMP1 cannot be used since its output CMP1OUT (internal
output) is not connected to the embedded timers.
Note:
When the current sensor voltage reaches the reference voltage, the COMP2 output goes
high. Consequently, the PWM and output compare reference signals go low (to safe state).
12/19
PWM signal control: COMP2 output redirection to timer
Doc ID 17758 Rev 1
feature). The possibility of redirecting the
AN3248

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AN3248 and is the answer not in the manual?

Questions and answers

Table of Contents