cancel
Showing results for 
Search instead for 
Did you mean: 

COMPx_OUT as a retriggerable monostable output

simo zz
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
simo zz
Senior

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.

View solution in original post

1 REPLY 1
simo zz
Senior

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.