cancel
Showing results for 
Search instead for 
Did you mean: 

HAL method to output timer overflow interrupt to a pin?

john doe
Lead
Posted on June 10, 2017 at 03:25

I think I'm not understanding the terminology, or something. I want to generate an external interrupt at a pin, when timer 2 overflows. I can generate an interrupt with the timer/counter just fine, it's the output to a pin that I'm having trouble with.

i THINK i want to use OC mode, but I'm not sure I'm understanding the terminology. Maybe PWM with a short duty cycle is what I want. Looking to generate a short pulse on a pin, periodically.

1 REPLY 1
john doe
Lead
Posted on June 10, 2017 at 04:36

0690X00000607JEQAY.png

Answered my own question. PWM with a short duty cycle.

prescaler 40000-1

period 2000

gives me a pulse every second or so on an 80MHz L476

0690X00000607JJQAY.png

and on an STM32L476-Nucleo board, TIM2_CH1 outputs to pin PA0.