cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407: Combining/modulating two PWM signals (logical AND) into one output

ESeke.1
Associate II

I have a requirement to generate two PWM signals on an STM32F407G MCU

As an example, the images of the signal I want to do are:

0690X00000By1GTQAZ.pngThere are many methods to generate signals in this way, it can be done by writing an interrupt function as an example, it can be done using gated mode and IRTIM can be used. However, it is necessary to reverse the signal coming through IRTIM and stm32 cards that support IRTIM are very few.

Which method works most stably without keeping the processor busy?

And can you show a sample project setup that performs this function?

Thank you everyone, and I wish you healthy days

5 REPLIES 5

As you've said, use two times in master-slave arrangement, slave in gated mode. There's no burden on the processor, once it's running.

JW

I make the necessary adjustment in Master-Slave mode, but I cannot run it the way I want. The device i use is STM32F407G_DISC1. Either I did not set it up correctly or there is a problem with the device. Could you please tell me which options should I choose?

Thanks for helping. Have a good day

0693W00000D1czQQAR.png

0693W00000D1czaQAB.png

> I make the necessary adjustment in Master-Slave mode, but I cannot run it the way I want.

What does it mean? What is the observed output?

I don't use Cube. Read out and check/post *both* timers' registers content.

JW