cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152 comparator triggers timer

mlegierski
Associate II
Posted on November 12, 2015 at 11:30

Is it possible to trigger any timer by comparator output in stm32l152? I want to configure timer to one pulse mode and i want to trigger it by comparator output. I have studied manual carefully, but I still don't know if it is possible.

1 REPLY 1
Amel NASRI
ST Employee
Posted on December 03, 2015 at 11:41

Hi legierski.michal,

Please refer to the description of OUTSEL bits in COMP_CSR register to know the Timers that are connected to comparator output. Only TIM2/3/4/10 can be used:

 Bits 23:21 OUTSEL: Comparator 2 output selection

 

These bits are written by software to connect the output of COMP2 to a selected timer input.

 

000 = TIM2 Input Capture 4

 

001 = TIM2 OCREF_CLR

 

010 = TIM3 Input Capture 4

 

011 = TIM3 OCREF_CLR

 

100 = TIM4 Input Capture 4

 

101 = TIM4 OCREF_CLR

 

110 = TIM10 Input Capture 1

 

111 = no redirection

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.