Hi, guys.
i'm noob with stm32
I have a problem. i use the library dan.drown.org and i'm not able to use the hardwaretimer.h.
wanted to change the frequency of the pwm for 25khz with variable duty cycle.
I haven't worked with the timers of stm32 yet.
library
https://github.com/rogerclarkmelbourne/ ... Serial.cpp
https://github.com/rogerclarkmelbourne/ ... reSerial.h
Can someone help me please ??
Set frequecy pwm
Re: Set frequecy pwm
try the examples here
http://docs.leaflabs.com/static.leaflab ... dwaretimer
duty cycle has to do with
http://docs.leaflabs.com/static.leaflab ... r.html#id2
cross reference RM0008 on timers
https://www.st.com/resource/en/referenc ... ronics.pdf
about output compare mode and pwm mode. the duty cycle is controlled by the capture compare register CCRx
which is the library called it the 'overflow'
http://docs.leaflabs.com/static.leaflab ... dwaretimer
duty cycle has to do with
Code: Select all
TimerX.setOverflow(Y)
cross reference RM0008 on timers
https://www.st.com/resource/en/referenc ... ronics.pdf
about output compare mode and pwm mode. the duty cycle is controlled by the capture compare register CCRx
which is the library called it the 'overflow'
-
- Posts: 502
- Joined: Fri Dec 27, 2019 4:53 pm
- Location: Munich, Germany
- Contact:
Re: Set frequecy pwm
Have a look here: viewtopic.php?p=1752#p1752