STM32F7 tim3 rollover with reload works, how do I get the interrupt for each external pulse?
I have tim3 setup to count to 25,000 using a 2.5Mhz input signal. This works. I enable the global interrrupt and it fires whenever the counter rolls. I have an issue though, that when I poll the timer for the count, it is double it should be and I can't find out why.
So I thought I would try to an interrupt whenever I get an incoming pulse and I can't figure out how to do this. So I need to either figure out why I am getting double pulses (not only on the inquiry with __HAL_TIM_GetCounter(&htim3) but also it rolls the counter early) or how do I set the interrupt on each pulse so I can count it myself? I am confident I am only getting one pulse for each of the double count. I've tried to do a callback with a number of callback functions but the only one that works is HAL_TIM_PERIOD_ELAPSED_CB_ID. I would like to get either an accurate count returned on __HAL_TIM_GetCounter(&htim3) or figure out a way to count it myself. If I did that latter though, I would still have to fix the rollover which is happening early.
Thoughts? I am really close to finishing this project. By the way, using an external interrupt on a GPIO pin, the count is correct (not doubled).
Thanks
Jerry
