cancel
Showing results for 
Search instead for 
Did you mean: 

change pulse width

saeed taherianfard
Associate II

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?

3 REPLIES 3
TDK
Guru

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

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

> 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".