7 years, 5 months ago.

PWM pins on NUCLEO-F072RB

Hi,

I am using NUCLEO-F072RB board with mbed libary. I am having four PWM out channels on MCU pins PB_4, PB_5, PB_1 and PB_0. Pins on MCU PB_0 and PB_1 working properly but PB_4 and PB_5 pwm out pins having an issue, these two are not working properly. Earlier I have tested all four pins are working properly. Please someone suggest me, what may be the issue.

What board are you talking about? There is no NUCLEO-F72RB board...

posted by Jan Jongboom 04 Oct 2016

It is NUCLEO-F072RB board.

posted by Kishore Chilakala 05 Oct 2016

2 Answers

7 years, 5 months ago.

Hi saraf.akshat,

We confirme the bug. A pull request is greated in the Github for fixing it at this Link https://github.com/ARMmbed/mbed-os/pull/3008

Meanwhile, you can use the mbed-dev source in the mbed IDE and correct it in PeripheralPins.c as following :

replace:

{PB_5, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 1, 0)}, TIM3_CH2

by:

{PB_5, PWM_3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM3, 2, 0)}, TIM3_CH2

-Hannibal-

7 years, 5 months ago.

PB4 and PB5 are not connected to the ADC. But PB0 and PB1 are. I assume that's where the difference is. See the datasheet page 34 and onwards. Pins marked TTa are connected to ADC.

Hi Jan,

Thanks for helping. I think, i can configure all mention pins as PWM out pins. Please suggest me for the same.

posted by Kishore Chilakala 07 Oct 2016

I am not able to generate PWM signals on PB_5 pin of STM32F072CB.

posted by Kishore Chilakala 11 Oct 2016