Skip to main content
mlegierski
Associate
November 12, 2015
Question

STM32L152 comparator triggers timer

  • November 12, 2015
  • 1 reply
  • 751 views
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.

    This topic has been closed for replies.

    1 reply

    Amel NASRI
    ST Technical Moderator
    December 3, 2015
    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 "Best Answer" on the reply which solved your issue or answered your question.