Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

stm32f103r6 PWM output

Status
Not open for further replies.

akhilfrancis

Junior Member level 2
Joined
Jan 13, 2017
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
180
Hai,

my name is akhil francis.
I am using STM32F103R6 CONTROLLER. I am new to STM32 controllers.
i want to generate pwm outputs from the controller,
my doubt, is this controller has dedicated pin for the pwm generation.? or can we generate the pwm o/p through the any of the i/o pin
by configuring the timer

thanks in Advance
Akhil Francis
 

1. Enable clock for timer
2. Setup the timer as timebase for PWM
3. Enable clock for GPIO and AFIO
4. Set IO as AFIO output push-pull
5. Setup PWM
6. Enable timer
7. Switch on PWM pins
Not really simple, but it is STM32))
 
There easier methods. You can using CubeMX to generate code: https://www.st.com/en/development-tools/stm32cubemx.html. But if you really want good understand work you must using method @Easyrider83.

On example (using CubeMX) for Timer1, PWM on channel 1:
1.png2.png
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top