cancel
Showing results for 
Search instead for 
Did you mean: 

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

chachamaru
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

>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

 

 

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

View solution in original post

22 REPLIES 22
Andrew Neil
Super User

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

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
Super User

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

 

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

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?

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

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.

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

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

Yes.
So now I'm trying PF6, which as far as I checked is not used on this board.
I don't have access to the oscilloscope right now, so I will check the waveform tomorrow.

Pins are already in use, but it works fine here:

TDK_0-1763908242338.png

I suspect a measurement setup issue. Post pictures of your setup and show the scope plot of a significantly slowed down PWM, say 100 kHz.

 

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

I used PF6 and I was able to output PWM.
However, the voltage did not reach 0–3.3 V.
When I lowered the frequency, the waveform became close to 0–3.3 V, but I need a 20–24 MHz clock.

PF6_XCLK_22.5MHz.PNG

Fig.1 PF6 PWM 22.5MHz

 

PF6_XCLK_9MHz.PNG

Fig.2 PF6 PWM 9MHz

  

PF6 seems to be free.     + signal looks ok.

1. set pin speed high for PF6

2. use 10:1 low capacitance probe

3. set it to 10:1 .

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