2026-02-25 2:47 PM
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:
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:
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!
Solved! Go to Solution.
2026-02-25 2:53 PM
PA2 and PB10 can both be used as output for TIM2_CH3. If PA2 "isn't working":
2026-02-25 2:53 PM
PA2 and PB10 can both be used as output for TIM2_CH3. If PA2 "isn't working":
2026-02-25 3:05 PM
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!