Skip to main content
Graduate
November 22, 2025
Solved

PWM Output on PB0 and PA8 does not Reach 0V or 3.3V (STM32F429I-Discovery)

  • November 22, 2025
  • 6 replies
  • 762 views

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.

TEK00016.PNG

    This topic has been closed for replies.
    Best answer by AScha.3

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

    AScha3_0-1764153753232.png

     

     

    6 replies

    Super User
    November 22, 2025

    @chachamaru wrote:

    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.


    So did you check if PB0 is also loaded by other on-board circuitry ?

    See the User Manual for the board, and/or its schematics - as always, both can be found on the Product Page for the board:

    Super User
    November 22, 2025

    Hi,

    see circuit of your board, pins pb0 + pa8 used for...

    AScha3_0-1763806483512.pngAScha3_1-1763806595015.png

    So first find free , unused pins to do something...

    https://www.st.com/resource/en/schematic_pack/mb1075-f429i-d02_schematic.pdf

     

    Super User
    November 22, 2025

    Why are you reposting this after accepting a solution?

    Solved: PWM output on PA8 (TIM1_CH1) does not reach 0V — w... - STMicroelectronics Community

     

    Slow down the waveform by a factor of 10. Still occuring?

    Graduate
    November 23, 2025

    Thank you for your reply.

    I was able to solve the issue where PWM on PA8 did not output at all by changing the pin from PA8 to PB0. At that time, PWM worked correctly.

    However today, without changing any settings or code related to PB0, the PWM output on PB0 suddenly stopped working properly.

    Moreover, after I reset some unrelated pin configurations, the PWM waveform disappeared entirely.
    (Before resetting those unrelated pins, I could at least see the degraded waveform like the one posted this time.)

    The situation where PA8 still cannot output a clean PWM also remains unchanged.

    Therefore, I posted again to report the updated situation and seek further advice.

     

    Yes, the same phenomenon still occurs even when I slow down the waveform by a factor of 10.

    Super User
    November 23, 2025

    >the same phenomenon still occurs even

    Did you read my post ?

    These pins are not free, they are used on this board. So you cannot use them, like free pins.

    Graduate II
    November 26, 2025

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

    Graduate II
    November 28, 2025

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

    Graduate
    November 29, 2025

    Alright.
    I will check the probe calibration next week, so please wait until then.

    Graduate
    December 2, 2025

    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?

    Super User
    December 2, 2025

    @chachamaru wrote:

    How can I get a clean 20–24 MHz PWM (XCLK) on this board?


    You said in this post that you understood why not:


    @chachamaru wrote:

     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.


     

    Graduate
    December 2, 2025

    I'm sorry, I didn’t explain it well.

    What I meant is this:

    If the PWM (XCLK) were being generated correctly, then VSYNC and HSYNC should also be generated correctly by the MT9M001.
    So my goal is not to see a perfect waveform on the oscilloscope, but to provide a clean and reliable clock signal into the camera.

    Therefore, I want to know how to output a “clear enough” PWM for the microcontroller-to-camera connection, not necessarily a perfect oscilloscope waveform.