Skip to main content
SWenn.1
Senior III
Jun 17, 2021 7:19 PM UTC
Question

Timer reset --- how to??

Using an STM32WB55, timer16 for switch debounce. It is set for 100ms. I was looking in the HAL library for the timer and I see start / stop functions, etc. but how do I reset my timer after I come into the ISR? I am sure the counter will roll over by the time I get into the ISR and I would like to reset it for the next pushbutton but see no calls how to do it. Seems very bleak to think I would have to do an INIT again.

Thanks

Steve

This topic has been closed for replies.

2 replies

Michal Dudka
Lead
Jun 17, 2021 7:51 PM UTC

You can write zero value to counter.

SWenn.1
SWenn.1Author
Senior III
Jun 17, 2021 8:11 PM UTC

Yup I just did that....

Thank you.