cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to use the output of one timer as clock source for another AND reset on GPIO edge trigger?

MSher.1
Associate III
 
2 REPLIES 2

Yes, sounds possible

PWM Input mode typically allows for a CH1 or CH2 connected GPIO to reset CNT, and also latch CCR1/CCR2 with period and duty type counts.

Clock source should be able to associated with a handful of different TIM. Usually the RM covers the clock sourcing options, which tend to be limited/finite.

TIM2 / TIM5 are typically 32-bit counters

https://www.st.com/resource/en/application_note/dm00236305-generalpurpose-timer-cookbook-for-stm32-microcontrollers-stmicroelectronics.pdf

https://www.st.com/resource/en/application_note/dm00042534-stm32-crossseries-timer-overview-stmicroelectronics.pdf

https://www.digikey.com/en/maker/projects/getting-started-with-stm32-timers-and-timer-interrupts/d08e6493cefa486fb1e79c43c0b08cc6

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

Thanks for the links and fast reply. I have been testing out multiple configurations using CubeMX and was not able to come up with one that would cover both requirements; individually was not an issue. I will review the linked material more deeply to see if it can work.