Skip to main content
saeed taherianfard
Associate II
October 25, 2020
Question

change pulse width

  • October 25, 2020
  • 3 replies
  • 1409 views

Hi there

MCU:STM32F429.

I have a signal like in the picture below.(input to MCU)

I want to change one of it's pulses width and send it to the output.

Is it possible to do it with timer peripheral?

This topic has been closed for replies.

3 replies

TDK
October 26, 2020

Changing the CCRx register will change the duty cycle. With preload enabled (OCxPE bit), you would wait for an update, change CCRx to the new value, wait for another update, then change CCRx back. It's doable.

"If you feel a post has answered your question, please click ""Accept as Solution""."
saeed taherianfard
Associate II
October 27, 2020

thanks for quick reply.

I want to know if i can do it without coding.

I have a synchronization clock.

Can I use the clock as ETR and the signal as a trigger?

Regards

TDK
October 27, 2020
> I want to know if i can do it without coding.
Your description is light on details, but I don't think you're going to get very far if your requirement is no coding.
If you want a long pulse, then some short pulses, then another long pulse, in a uniform pattern, possible this can be done with DMA.
"If you feel a post has answered your question, please click ""Accept as Solution""."