2024-07-14 05:31 PM - edited 2024-07-14 05:32 PM
hi there,
i have a NUCLEO-H7S3L8 dev kit and i am trying to generate a specific number of pwm pulse. i want to generate 10 pwm pulse with ability to delay the t-on. i am trying to workout how to do this in stm32. i am thinking of using pwm with dma. am i in the right track or how should i approach this problem?
below is the example waveform i want to generate. Led0-ref is the reference pwm that will have t-on of 10us and total cycle of 120us. led 1 will use led 0 as the reference to control the delay. as you can see below when there is no delay cycle t-on is 10us and total cycle is 120us. when there is a delay of 3us, the delay total cycle stays the same 120us, only the start of the t-on is on delayed by 3us.
2024-07-14 09:45 PM
For generating 10 PWM pulses with adjustable on-time delay on STM32, using PWM with DMA is a good approach. You can synchronize pulse generation based on your reference PWM and adjust delays using DMA for precise timing control.
2024-07-14 11:47 PM
Hi,
depends on which timer you want to do it....if TIM1 or 8 , it should work with the timer settings :
can set combined mode, to set begin and end of a output pulse, as you want:
+ make just 10 pulses, maybe using the