Skip to main content
Senior
October 25, 2019
Solved

COMPx_OUT as a retriggerable monostable output

  • October 25, 2019
  • 1 reply
  • 725 views

Hi,

I am using an STM32L4 MCU and I need to make the COMPx_OUT acting as a retriggerable monostable output.

​

I know I can use timers as blinking source for COMPx_OUT, but this would not help, and as far I understand, the only way to solve my problem via firmware would be, at each EXTI interrupt:

​

  • Set to VOH the GPIO output
  • Start a one shot timer for t seconds
  • Set to VOL the GPIO once the timer has overflowed.

​

Am I missing something or is there any better automated firmware solution ?

​

Thanks for any hint.

Regards.

s

This topic has been closed for replies.
Best answer by simo zz

Reading better the TRM (RM0394), I see that I can redirect the COMPx_OUT to TIM1 or TIM2 TGI, so use one of these timers as retriggerable OPM mode and use the TIMx_CHx output instead of the COMPx_OUT.

1 reply

simo zzAuthorBest answer
Senior
October 26, 2019

Reading better the TRM (RM0394), I see that I can redirect the COMPx_OUT to TIM1 or TIM2 TGI, so use one of these timers as retriggerable OPM mode and use the TIMx_CHx output instead of the COMPx_OUT.