Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 1 month ago.
STMF103 PWM
Hi Guys
I don't have a STM103 to play with but am working on a schematic that includes one. I need to drive a magnetic buzzer with PWM signal. Can someone just check for me: PB8 according the datasheet is TIM4_CH3 so I assume it's capable of delivering a 2700hz signal.
But the mbed board page's pretty picture doesn't show that it supports PWM. See attached pictures.
Which one do I trust?
1 Answer
6 years, 1 month ago.
Riann -
You cannot use PB8 for pwm using mbed, but both documents are technically correct.
Check the file "PeripheralPins.c" for this board and you see that mbed uses TIM4 for the ticker function. You cannot use any of the TIM4 channels for pwm without changing the default timer.
JR