Skip to main content
MGOEL.1
Associate III
March 3, 2023
Question

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

  • March 3, 2023
  • 3 replies
  • 849 views

..

This topic has been closed for replies.

3 replies

gbm
Lead III
March 3, 2023

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
Tesla DeLorean
Guru
March 3, 2023

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 VenmoUp vote any posts that you find helpful, it shows what's working..
MGOEL.1
MGOEL.1Author
Associate III
March 6, 2023

how to sync them by hardware?