cancel
Showing results for 
Search instead for 
Did you mean: 

Timer setup issue with alternate functions

sidisyom_s
Associate II

Hi,

I have setup three channels in Timer_2 on an 32F429 MCU and have come across a seemingly inconsistent behaviour with regards to the alternate functions mentioned on the datasheet.

More specifically, I have setup pins PA0, PA1, PA2 for Output_Compare, Input_Capture and PWM against channels 1, 2 and 3 of Timer_2 respectively and although the behaviour I observe on pins PA0 and PA1 is the expected one (well nearly the expected one but will ask a new question a bit later as that's probably a separate issue), pin PA2 is entirely dead as I don't get any pulsation happening whatsoever.

I checked my configuration again and again in order to make sure it's setup correctly and verified the alternate functions I've setup for the gpio pins match the datasheet but that all looked fine:

Screenshot from 2026-02-25 22-26-36.png

I then scrolled a bit further down on the datasheet and noticed that there's an alternative alternate-function pin for Timer_2 channel 3, namely PB10:

Screenshot from 2026-02-25 22-35-33.png

So, I tried configuring that for the PWM pin and voila, it all worked and I started getting the expected pulsation on the pin.

So, I'm wondering why this behaviour and if there's something I've missed in the RM/DS with regards to the alternate-function pin configuration?

Any clues?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

PA2 and PB10 can both be used as output for TIM2_CH3. If PA2 "isn't working":

  • It's not configured correctly.
  • It's actually working but you're not monitoring it correctly.
  • There is a hardware issue such as a cold solder joint.
  • The pin is damaged.
If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Super User

PA2 and PB10 can both be used as output for TIM2_CH3. If PA2 "isn't working":

  • It's not configured correctly.
  • It's actually working but you're not monitoring it correctly.
  • There is a hardware issue such as a cold solder joint.
  • The pin is damaged.
If you feel a post has answered your question, please click "Accept as Solution".

Yeah, that was my initial thought, that something in my configuration is off but then simply changing the pin reference to PB10 without changing anything else it all started working which leads me to believe this isn't a configuration issue. Similarly, in terms of observability I'm using the exact same method (basically just lighting an LED as the pulsation frequency is rather short).

So, it could be the other two reasons you mention. I didn't actually solder anything and am simply using a discovery board (and don't really remember if I have successfully used that same pin for any I/O before) but yeah maybe something wrong with that.

Thanks!