cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous Phase-Shifted PWM Controls with STM32F411RE/407VG 50MHZ Timer Freq.

erincyldz
Associate III

Hello people, i want to create 4 different PWM signals that has total period of 100 microseconds and working with %25 duty cycle. My timers are working with 50 MHz Speed but it is not necessary to do so. I need them to be shifted 25 microseconds apart from eachother. What i mean by this is actually; PWM1 starts-> 25 microseconds later PWM1 Pulse goes LOW and PWM2 goes HIGH -> 25 microseconds later PWM2 goes LOW and PWM3 goes HIGH and so on. Is there anyway to do this with STM32F411RE/407VG mcu's? I have both eva-boards for those mcu's. I know it will be slight differences between those signals because it is not a FPGA board but i am willing to see what i can achieve with those 2 controllers. Thank you all!

17 REPLIES 17

i guess i have to set my signals according to that slew rate in order to achieve exact (at least close enough) 100 microseconds period but i will try my best to drop the slew rate as much as possible

i tried this exact code and it perfectly worked. i still have a slew rate that it affecting me but i guess i dont have anything else to solve that. thank you dude

:thumbs_up:

+ on F407: for max. slew rate : set pin speed very high, makes about 2 ns switching time:

AScha3_0-1702977037291.png

BUT need high speed + low capacity 10 : 1 probe too see this on a (fast) scope !

If you feel a post has answered your question, please click "Accept as Solution".

im kinda new to stm. how can i set up pin speed on cubeIDE can you guide me on that one too i would be very appreciated. thanks for your replies

:)

-- just in cube ->

AScha3_0-1702980163576.png

 

If you feel a post has answered your question, please click "Accept as Solution".

i cant configure that cubeIDE does not allow me to change those pins why is that? any idea ?

okay i found it it is on the System Core-> GPIO section thank you very much again

+ or scrolling down can show new things...

 

AScha3_0-1702984060179.png

 ;)

If you feel a post has answered your question, please click "Accept as Solution".