2020-07-26 04:18 PM
Hi all,
I'm using a 480 MHz STM32H753 uC for a graphics project, and I'm trying to use a very fast PWM signal. I can achieve a 5 MHz square wave that is relatively clean, but when I up that to 10 MHz it's clear that the rise/fall times are too long, and the wave becomes a triangle. Once I reach 20 MHz, the wave is very rounded and can barely get above 1 Volt before it falls again. I require ~25 MHz for my project.
I was wondering if these speeds should be possible at all or if this is expected behavior. If this should be possible, then perhaps there are some settings that I can change in CubeMX? I've already changed the GPIO speed to 'very fast'.
If this isn't possible and the behavior I'm seeing is normal, then how peripherals like the LCD-TFT controller work? They advertise clock speeds of up to 80 MHz, which I clearly cannot currently come close to.
Let me know if there's more information I can provide! Thanks in advance
2020-07-26 05:00 PM
If the speed is at max, the hw output impedence maybe too low.
2020-07-26 05:50 PM
Pardon my ignorance here, I'm a far better programmer than I am electrical designer :grinning_face_with_sweat:
Wouldn't a higher impedance lead to a faster rise time? So in my case a low impedance would be desirable?
2020-07-26 07:54 PM
You can achieve well over 25 MHz PWM output. The datasheet claims 220 MHz under certain conditions.
Which pin? Some pins have reduced capacity, PC13, PC14, PC15.
More capacitance on the pin will reduce the slew rate and maximum frequency. Maybe you have too much capacitance on the line.
2020-07-26 08:05 PM
This is on pin PE5.
The line's capacitance should be very low; there is only a 20 mm trace, a 1.5mm test point, and a connection to another IC which uses the signal as a video pixel clock (digital input).
I'm assuming that by setting the GPIO's speed to "very high" in CubeMX I've already done all I can from a software perspective for the pin's slew rate?