cancel
Showing results for 
Search instead for 
Did you mean: 

TIM2_CH2 PWM not work

guansonghuang
Associate III

hello,st friends.

   My board use TIM2_CH1 pwm to drive a led.

guansonghuang_0-1725529122888.png

guansonghuang_1-1725529135873.png

dts configure as:

guansonghuang_2-1725529182907.pngguansonghuang_3-1725529192667.png

but the led can not light on.use these command

guansonghuang_4-1725529262366.png

 

byw: I use gpio test led hardware is ok

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jean-Marc S
ST Employee

Hello

We discovered an issue in the Datasheet of the MP13.

It will be described in an errata and DS updated soon.

The TIM2_CH1 and TIm2_ETR are not available on all GPIO as listed currently on DS:

The correct settings are:

  • PA0, PA15, PD3, PG8 only TIM2_CH1
  • PE2, PF13, PE15 only TIM2_ETR
  • PA5 both TIM2_CH1, TIM2_ETR

so in your case PF13 only supports TIM2_ETR.. not TIM2_CH1 

 

JM

View solution in original post

8 REPLIES 8
Sarra.S
ST Employee

Hello @guansonghuang

Verify that the PWM is exported correctly, you should see pwm0 listed using 

ls /sys/class/pwm/pwmchip0 

 Also, try using an oscilloscope or logic analyzer to verify that the PWM signal is being generated on the correct pin (PF13)

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

hi @Sarra.S 

guansonghuang_1-1725613031881.png

 

guansonghuang_0-1725612514660.png

I use oscilloscope vefify no pwm out on PF13;

 

but

1、if change pwm channel1 to PA5.that is ok

2、Enable all 4 pwm out,all other 3 pwm output correctlly excpt for PF13

 

guansonghuang
Associate III

I verify TIM2_CH1 bare metal using PF13.  it is the same result as linux not working.

So  I assume that PF13 can not be assigened to TIM2_CH1.

please help to double check this. thank you

Jean-Marc S
ST Employee

Hello

We discovered an issue in the Datasheet of the MP13.

It will be described in an errata and DS updated soon.

The TIM2_CH1 and TIm2_ETR are not available on all GPIO as listed currently on DS:

The correct settings are:

  • PA0, PA15, PD3, PG8 only TIM2_CH1
  • PE2, PF13, PE15 only TIM2_ETR
  • PA5 both TIM2_CH1, TIM2_ETR

so in your case PF13 only supports TIM2_ETR.. not TIM2_CH1 

 

JM

guansonghuang
Associate III

Thank you very much

if errata release,please notify me

Jean-Marc S
ST Employee

ok

Hello

Please note that the updated errata sheet is now available on st.com

https://www.st.com/resource/en/errata_sheet/es0539-stm32mp131x3x5x-device-errata-stmicroelectronics.pdf

JM