Page 1 of 1

Cant Get PWM working on PB6-PB9,

Posted: Thu Mar 30, 2023 11:11 pm
by dhlii
I am using an STM32 Bluepill with the STMelectroncs:stm32:GenF1 board selection,
I need 12 Hardware PWM's. I have working PWM's on PA0-3 and PA6, PA7 and PB1 but not PB6-PB9

I do not have a clue where to look for a problem I have noted that all the Outputs that are not working are on the same side of the Board.
All the 5v tolerant pins are working.

PB6-PB9 work - but as Digital Outputs, analogWrite(pin,value) sets the pin low for most values and then High for the remaining values.

I have worked extensively with STM32's before, but not with the stm32Duino environment.

I am trying to avoid doing this as an entirely Bare Metal Project.

Re: Cant Get PWM working on PB6-PB9,

Posted: Fri Mar 31, 2023 5:34 am
by fpiSTM
Share your code, please.

Re: Cant Get PWM working on PB6-PB9,

Posted: Fri Mar 31, 2023 7:32 am
by fpiSTM
I think I've understood your issue. You told you select Generic F1 but by default this is the BluePill F103C6 which have less feature (no Timer on PB6...)
So select the correct BluePill F103C8 in the board part number menu.