cancel
Showing results for 
Search instead for 
Did you mean: 

is there some sample code showing how to count external events with TIM3 or TIM4 (with or without interrupt)? I'm using a STM32F429Idisc with HAL library and system workbench.

Hicss.2033
Associate III
 
2 REPLIES 2
TDK
Guru

I don't see any in the Cube repo. Shouldn't be hard to generate an example with CubeMX. You want a timer in external clock mode.

If you feel a post has answered your question, please click "Accept as Solution".

The mechanics here shouldn't be that hard to replicate in HAL. You can set the count period/total for the counter, and don't need to interrupt.

https://community.st.com/s/question/0D53W00000COHcsSAH/is-there-a-sample-code-showing-how-to-count-external-events-on-a-stm32f429i-discovery-using-timer-3-thanks-piero

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..