cancel
Showing results for 
Search instead for 
Did you mean: 

IN STM32F446RE I AM TRYING TO GENERATE 16 PWM CYCLES ON TIM2CH4 THEN ONE PWM CYCLE ON TIM3CH4 BASICALLY I NEED TO COUNT PWM N CYCLE AFTER N CYCLE ONE PULSE PWM GENERATION REQUIRED HOW TO COUNT PWM PULSES

MGOEL.1
Associate II
 
3 REPLIES 3
gbm
Lead III

No need to count anything. Just set TIM3 to period 16x that of TIM2 and start them simultaneously using hardware sync.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

SOME OF THE ADVANCED TIMERS HAVE A REPETITION COUNT WHICH CAN ​BE FIRED IN ONE SHOT MODE TO GET A SPECIFIC NUMBER OF PULSES. OTHERWISE YOU'RE GOING TO NEED TO COUNT UPDATE INTERRUPTS OR COUNT WITH AN ADDITIONAL TIMER.

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

how to sync them by hardware?