2025-11-21 10:02 PM
Hello,
I am currently wor
king on connecting an MT9M001 camera module to the STM32F429I-Discovery board and displaying the captured image on a PC.
During this process, I am testing PWM output on the board, but I am experiencing an issue where the output voltage does not swing between 0 V and 3.3 V as expected.
Environment
Board: STM32F429I-Discovery
IDE / Firmware: STM32CubeIDE + HAL (STM32CubeF4 package)
Pin used: PB0 / TIM3_CH3 (Alternate Function, Push-Pull, no pull-up/down)
PWM: Generated with TIM3 (frequency and duty cycle shown in attached code/images)
Measurement: Oscilloscope (×10 probe, GND connected to board GND)
Issue
The PWM waveform output from PB0 shows the following problems:
The low level does not go down to 0 V
The high level does not reach 3.3 V
Before switching to PB0, I was using PA8 (TIM1_CH1), but I observed the same issue—
the voltage could not drop to 0 V.
I received advice that PA8 might be loaded by other on-board circuitry,
so I moved the PWM output to PB0 (TIM3_CH3).
However, the same reduced voltage swing occurs on PB0 as well.
If anyone knows possible causes or has experienced a similar issue,
I would appreciate any guidance.
Solved! Go to Solution.
2025-11-24 5:48 AM - edited 2025-11-24 5:49 AM
>When I lowered the frequency, the waveform became close to 0–3.3 V, but I need a 20–24 MHz clock.
As expected, this means it's a test measurement issue.
So why did you say above that this didn't work?
> Yes, the same phenomenon still occurs even when I slow down the waveform by a factor of 10.
There's no problem with the chip here, but rather with how you are measuring it. Set pin speed to very high, use shorter test leads, ensure nothing else is connected to pin.
2025-11-26 1:19 AM
I set the pin speed to "Very High" for PF6.
I am using a 10:1 probe as shown in Fig. 2.
The probe is correctly set to 10:1, as in Fig. 3.
I also disconnected everything related to the MT9M001 module.
However, the maximum voltage still does not reach 3.3 V.
Fig.1 Wave of PF6
Fig.2 Probe
Fig.3 Probe setting
2025-11-26 2:42 AM
>the maximum voltage still does not reach 3.3 V.
Right, but thats fine now. Your probe loads > 12PF to the pin, at 22MHz this is about 800 ohms , so you cannot expect it better.
Try a high speed signal generator, if you have, and check its output at 20MHz, 0...3 V ;
to see, what your probe and scope can show at all here !
Because probe (and scope?) is 100MHz type, so looking at a 22MHz square, you can see 3. harmonic good, 5. harmonic is 22x5= 110 Mhz and will show still, but reduced level; and all higher harmonics your scope cannot show.
So all you can see from a perfect 22M square wave, is what you see now. (on 100M scope).
here 3. + 5. :
2025-11-26 4:02 AM
... and do not use the 10 cm GND connector of the probe. Use a spring tip for GND instead.
And check the scope's bandwidth. Should be at least 10 x of max signal frequency to see something close to a square wave.
2025-11-28 12:34 AM
Thank you for the detailed explanation.
I understand now that the limited voltage swing is caused by the probe loading (over 12 pF),
which becomes roughly 800 Ω at 22 MHz.
So the reduced amplitude is expected and not an issue with the MCU pin itself.
Unfortunately, I don’t have a high-speed signal generator,
but I now see that with a 100 MHz scope, only the 3rd harmonic of a 22 MHz square wave is fully visible and the higher harmonics are suppressed.
Therefore, the waveform I am seeing is consistent with the scope and probe limitations.
Thank you again for the clarification.
2025-11-28 1:59 AM
If that has now answered your question, please mark the solution.
(You need to mark the post which best answered your question - not this one!)
2025-11-28 3:36 AM
... wait: I thought these x10 probes have usually some adjustable capacitive compensation for the divider and input capacitance, so unless your scope's bandwidth is the limit, 22 MHz should look better. At least if the probe's properly adjusted.
2025-11-28 11:31 PM
Alright.
I will check the probe calibration next week, so please wait until then.
2025-12-01 8:53 PM
I adjusted the probe compensation as you suggested, but the waveform still did not change.
2025-12-02 12:49 AM
I tried PA8, PB0, and PF6 for PWM output, but none of them can produce a clean 0–3.3 V waveform.
Even PF6, which is not connected to any on-board load, shows the same reduced swing.
Because of this, the camera cannot generate HSYNC and VSYNC properly.
How can I get a clean 20–24 MHz PWM (XCLK) on this board?