STM32 Guide #3: PWM + Timers

  Переглядів 128,752

Mitch Davis

Mitch Davis

День тому

This video covers the basics of PWM, and how to implement it with STM32.
STM32 gives you a bit more control than Arduino, but all these extra parameters might be a bit overwhelming at first. This video describes Duty Cycle, Resolution, Frequency, and other things that will help you get started with PWM.
Part 2 will be released eventually.
0:00 Review
1:14 Essential Functionality for Microcontrollers
2:47 Analog Write (Arduino)
3:38 PWM vs DAC
4:23 PWM Duty Cycle
5:25 Counters (Timers)
6:07 PWM Resolution
7:57 Review + Math Problem
9:56 Blue Pill PWM implementation
20:07 Cat

КОМЕНТАРІ: 250
@nict2618
@nict2618 3 роки тому
Such an underrated channel.
@AntHenson
@AntHenson 2 роки тому
It'll blow up. I can feel it in my waters.
@la6mp
@la6mp 3 роки тому
This is one of the best instructions I have ever had, and I’m a 65 years old EE :-) I can imagine the amounts of time you have spent making these videos. I have played with Arduino for many years, but you are the first to teach me what REALLY goes on behind the IDE. Because of you I’ll start working with STM, and you’ve already given me a flying start. But please don’t stop now ... Again, thanks a lot !
@ductm208
@ductm208 6 годин тому
wow, last 2 parts were good but this one is really impressive! I think your channel deserves more subscribers!
@arsebiscuitsandwine
@arsebiscuitsandwine 3 роки тому
This is fantastic Mitch, you have a real talent for explaining these concepts in a way beginners can understand.
@arsebiscuitsandwine
@arsebiscuitsandwine 3 роки тому
Also, zoom zoom zoom, zoomzoomzoomzoomzoom. Zoom.
@regal_7877
@regal_7877 3 роки тому
Great video. Keep 'em coming. 20 minutes, 30 minutes, 1 hour. No problem. The explanation is what matters. Beginners coming from 8-bit AVR like me can really understand the thorough, seemingly obvious concepts that you explain. Can't wait for the next one
@regal_7877
@regal_7877 3 роки тому
@@MitchDavis2 Damn. Well, it's much appreciated. And just take your time with it because it also gives us (me) time to also play around and experiment with programming the STM32. Helps me learn a lot more just in time for your next revelation. Kind of like Uni. Lol
@Timkaasjager
@Timkaasjager 3 роки тому
Totally agree, good explainers for stm32 systems are so precious
@shamanthks7218
@shamanthks7218 Рік тому
"PWM series to be continued :) " Last upload on this series: 2 years ago :( We give you full support to continue to the series on STM32. Please continue with the amazing series. We will be waiting for the next videos...
@davebenemerito310
@davebenemerito310 3 роки тому
never clicked subscribe button so fast
@pjauniau
@pjauniau 3 роки тому
your channel is just what I needed to start with stm32 long time user of arduino here :-) greetings from Belgium
@aaronjoseph3459
@aaronjoseph3459 3 роки тому
Hello. Please continue making this series if you can. The previous ones have been super helpful. Thanks a lot for making videos :)
@adaminsanoff
@adaminsanoff 2 роки тому
You can't imagine how good you are at teaching programming. I still watch your videos even though I already have the knowledge of what you teach.
@angelosnegkas
@angelosnegkas 3 роки тому
Mitch your are an oasis in the youtube/stm world! Thank you for your time. Great explanation!
@MitchDavis2
@MitchDavis2 3 роки тому
Comments like these are what make it all worth it. Thanks!
@botak333
@botak333 26 днів тому
​@@MitchDavis2 hi mate how about like this??? Code: htim1.Init.Period = ((PWM_PERIOD_CYCLES) / 2); Code: sConfigOC.Pulse = (uint32_t)(((PWM_PERIOD_CYCLES) / 2) * 0.6); It will working?? So no need set pwmc setphasavoltage, because global pwm duty (pulse) already set max 60%?? Or this will set all tim for 60% sir?? Any idea?? Thank u
@botak333
@botak333 26 днів тому
​@@MitchDavis2 hi mate how about like this??? Code: htim1.Init.Period = ((PWM_PERIOD_CYCLES) / 2); Code: sConfigOC.Pulse = (uint32_t)(((PWM_PERIOD_CYCLES) / 2) * 0.6); It will working?? So no need set pwmc setphasavoltage, because global pwm duty (pulse) already set max 60%?? Or this will set all tim for 60% sir?? Any idea?? Thank u
@MrHD71
@MrHD71 3 роки тому
Yey. Finally part 3
@jabbathehut9564
@jabbathehut9564 2 роки тому
Thanks for the tutorials Mitch! You explain very well. Keep them coming!
@Epiphonication
@Epiphonication 2 роки тому
Your videos are great, thank you for all the time you put into them!
@rflab2666
@rflab2666 2 роки тому
Great video, well explained and presented. Looking forward to more videos. Thank you for your efforts to put this together
@antonis476
@antonis476 3 місяці тому
amazing work Mitch
@gregrogers275
@gregrogers275 3 роки тому
Thanks again for the video Mitch!
@abhishek2813
@abhishek2813 2 роки тому
Your explanations feel like a friend is teaching me. really appreciate that!
@xKreesherZ
@xKreesherZ 2 роки тому
i love your videos, some good informations, super clear explanations, no useless words, just wow
@Mr0neShotAway
@Mr0neShotAway 3 роки тому
Wow, this is amazing, this is exactly what I needed coming from Arduino. Please keep up the great job!
@dukedougal16
@dukedougal16 3 роки тому
This a superb first class explanations of things I’ve been trying to understand. Really really great.
@abutaymiyyahlectures
@abutaymiyyahlectures 2 роки тому
an absolute beast, best pwm video on stm32
@brendanbarbour8568
@brendanbarbour8568 3 роки тому
Great job again Mitch...looking forward to the Nucleo implementation. That was one scared cat ..!!
@RanHam
@RanHam 3 роки тому
Thanks for posting these. They are very helpful and easy to follow
@brandondean961
@brandondean961 11 місяців тому
Thanks you Mitch Davis! Well explained.
@tony467913
@tony467913 3 роки тому
great tutorial, please keep updating.
@widya1836
@widya1836 2 роки тому
i love this, OMG, spectacular content, easy to understand than others tutorials
@onursertgil5814
@onursertgil5814 2 роки тому
These videos are great and extremely helpful. Thanks for sharing such informative videos, please continue :)
@valerienihsimsion1870
@valerienihsimsion1870 3 роки тому
Courage and thank for for the free education
@kevinanjorin8815
@kevinanjorin8815 3 роки тому
Bro this is actually the best video on stm 32 I saw big thanks man keep on the good work 👌🏾👌🏾❤️❤️
@ahmedhamam997
@ahmedhamam997 5 місяців тому
Great videos relly, hope you complete this series
@sabbrush6001
@sabbrush6001 7 місяців тому
Dude you were made a fantastic work up here.
@hicret2905
@hicret2905 3 роки тому
As a newbie , I am very happy to watch your videos. Good work Mitch
@LL-ue3ek
@LL-ue3ek Рік тому
This series video is a great help to those who just started using STM32, as well as those who are somewhat familiar with it without being proficient; I am the latter. All tricks learnt in operating the STM32 IDE environment are so valuable that they will save you a lot of time and energy and most importantly, frustration. These tricks and insights are bridging the gap between where I am and where I want to be. I appreciated your generous sharing of knowledge which you at one point had to put in efforts to learn yourself!
@rrowan327
@rrowan327 3 роки тому
LOL I saw a cat.... btw: Thank you for continuing this series.
@rrowan327
@rrowan327 3 роки тому
@@MitchDavis2 its a shame the cat was so camera shy
@dineshganesh6723
@dineshganesh6723 3 роки тому
Your videos are awesome.. explaining perfectly man😎.. thanks for the precious time you spent on to educate us...👍
@ELANCHEZHIYANRJ
@ELANCHEZHIYANRJ 11 місяців тому
The best explanation for duty cycle i have ever heard bro nice one
@yahyayozo8660
@yahyayozo8660 2 роки тому
great explanation man I really like it it removed some confusion I had about PWM
@ShizzleMyChizzle
@ShizzleMyChizzle 11 місяців тому
Dude, seriously, you have insane talent explaining things. There are no gaps of knowledge left out, you answer every question I have as you go along. Videos of THIS high level of quality is rare!!!
@audiodiwhy2195
@audiodiwhy2195 2 роки тому
Excellent video series. Thanks
@kienvo9072
@kienvo9072 2 роки тому
This is amazing Mitch. As a beginner in stm32, i have no word to say than thank you so much. You are really talented in explaining to others
@pw3111
@pw3111 2 роки тому
Excellent tutorial.Thanks!
@tayloroxelgren264
@tayloroxelgren264 3 роки тому
This content is gold
@tanmaygote7330
@tanmaygote7330 4 місяці тому
please continue this series your explaiation skills are too good.!!!
@Pzapza
@Pzapza 2 місяці тому
Really precise explanation. Didn't really leave any doubts and covered all that was needed. Hope to see more topics covered by you. Keep up the good work.
@southgrove
@southgrove Рік тому
Fantastic video. :) Great job! 👍
@k.t.d.chathumisamaraweera9477
@k.t.d.chathumisamaraweera9477 2 роки тому
Thank you so much for sharing your knowledge..
@foodotcom
@foodotcom 2 роки тому
Best video on pwm&stm aaah tysm 🤌👏
@sumit2k
@sumit2k 3 роки тому
Keep posting about STM32 Tutorials. you are doing great
@MehmetKaya01
@MehmetKaya01 2 роки тому
Awesome video Mitch! Thank you so much :)
@naidol
@naidol 3 роки тому
another excellent video. perfect actually, including the cat at the end. please keep it coming.
@progmatica1608
@progmatica1608 Рік тому
We need more videos like this!
@mudassarliaq7804
@mudassarliaq7804 2 роки тому
Awesome Video Man. Keep the good work up.
@tareqalmustafa
@tareqalmustafa 2 роки тому
Man , usually I never leave comments on youtube , but as your channel is not yet large , I want to say this first 3 videos are best of the best . Thank you very much
@wowowowdog
@wowowowdog Рік тому
Thank you Davis. This really saved my day!
@zeffster2
@zeffster2 Рік тому
great stuff who's been a around basic Arduino. Just perfect content on a little more low level, but not too much
@rjgonzalez8108
@rjgonzalez8108 2 роки тому
I subscribed instantly after seeing you do one simple thing most of the people making tutorials on this topic don't do . . . you took the time to zoom into the code. Both literally and figuratively speaking. Videos like yours would have saved me lots of heads and time when I was starting out.
@ManishMoorjmalani
@ManishMoorjmalani 2 роки тому
Great work man, keep it going.
@danijandiegues
@danijandiegues 3 роки тому
Thanks Mitch, and great job again!! Congrats!! Pls continue this series. PS.: Like the "post credit scene".
@uajoku
@uajoku Рік тому
You're a great teacher. Thank you.
@singhman1026
@singhman1026 Рік тому
Best artist is the one who can simplify toughest of the concepts..... And u really are an artist
@edescrambler
@edescrambler 2 роки тому
Very good explanation.
@highfrequency-tx6mf
@highfrequency-tx6mf Місяць тому
Great video bro. Thanks!
@225278318
@225278318 Рік тому
Very useful. Thank you so much!
@meetpatel5142
@meetpatel5142 Рік тому
The explanation is what matters. Beginners coming from 8-bit AVR like me can really understand the seemingly.🙌🙌💖
@fixfaxerify
@fixfaxerify Рік тому
Great stuff!
@aminesemlali6199
@aminesemlali6199 Рік тому
thank you from the heart
@someonesays8022
@someonesays8022 3 місяці тому
Hi man, I hope you are doing ok. You have really helped me a lot in learning to start programming the STM32 microcontrollers.
@Vandebilt
@Vandebilt 9 місяців тому
This is an absolutely excellent introduction to STM and PWM. Thank you so much for taking your time to explain to a 62 years old geek :)
@TheJavaSync
@TheJavaSync 2 роки тому
Pretty easy to understand, since I'm not real programmer, because it's really amazing explanation!! Thank You, MitchLED 😅
@GundamTricks
@GundamTricks 4 місяці тому
The best beginner-friendly explanation about PWM timers. For some viewers, there might be a bit of misunderstanding. At 9:25, you're using 72 MHz as example (281 kHZ fix typo), and at 19:10, you're using 8 MHz, as shown by the 31 kHz reading on the oscilloscope."
@rishab9761
@rishab9761 3 роки тому
Great series, you should definitely keep continuing these and cover all embedded software/firmware concepts. Love it
@MitchDavis2
@MitchDavis2 3 роки тому
I’m 4 days into filming video #4 right now. I really wish they didn’t take so long to make
@rishab9761
@rishab9761 3 роки тому
@@MitchDavis2 Thank You for these wonderful videos. So useful. Take your time. I have subbed to you, will be sure to check it out as soon as they are out :)
@romanchik4938
@romanchik4938 2 місяці тому
Really nice video. I hope your channel will get more attention
@akshaykuralkar8848
@akshaykuralkar8848 Рік тому
it was best video on pwm Thank you sir
@nravikiran4661
@nravikiran4661 Рік тому
Thank you Mitch Davis
@bogusbyte
@bogusbyte 2 роки тому
Thank you.... finaly found i clear to the point howto.....
@patrice9480
@patrice9480 3 роки тому
amazing content !!!
@DenSvet
@DenSvet 2 роки тому
thank you! your video saved my time.
@warchiefgaming4690
@warchiefgaming4690 2 роки тому
Such a amazing explanation.... Mann you deserve more view nd subs.. love you...nd thanks❤️
@sydneyrobaux5964
@sydneyrobaux5964 3 роки тому
Awesome, keep going !
@estebancere8407
@estebancere8407 Рік тому
Grande Mitch!
@tanjiro3285
@tanjiro3285 9 місяців тому
Please continue this series 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
@pratyushpatel6224
@pratyushpatel6224 3 роки тому
Great video,Keep it up!!!
@manfred4283
@manfred4283 3 роки тому
Thanks for the video series about STM32. Your explanations are really great. There is a typo in the calculation of the PWM frequency. It is actually 281250 Hz instead of 218250 Hz. Later on the scope shows the right duty cycle but at another frequency. Might be related to the clock configuration. This is a little confusing for beginners like me. But the video still helped me to get the PWM configured.
@peterbraganza3258
@peterbraganza3258 2 роки тому
Hey I had a similar confusion with the frequency at the end being about 31kHz. What I think is he used the internal HSI(High speed clock) RC oscillator which gives you a frequency of 8MHz . So when you calculate the frequency of PWM you get 8Mhz/256 = 31kHz. hope this helps! (Note: You can get 72Mhz clock speed from the external crystal oscillator but you have to configure that in the CubeMX clock configuration)
@englishguy3899
@englishguy3899 11 місяців тому
please continue on making videos your perfect
@EngMazen
@EngMazen 3 роки тому
Good information comes only from good understanding
@startobytes
@startobytes 3 роки тому
Good explained, thanks :)
@pranavchippalkatti2850
@pranavchippalkatti2850 3 роки тому
Loved it !! ❤ from India !!
@samybarakat7795
@samybarakat7795 2 роки тому
Thank you for the video :)
@ahmadmaaz2566
@ahmadmaaz2566 2 роки тому
Bro you are just awesome
@ElectroMathExp
@ElectroMathExp 2 роки тому
That cat was hilarious , Great video as always
@zentiremusic123
@zentiremusic123 Рік тому
Bossvideo!!! Thx a lot!
@dylanbaird74
@dylanbaird74 5 місяців тому
thank you - I understand PWM now
@mikebarney
@mikebarney 2 роки тому
Great Video! it would be cool to see a SPI demo
@dmitrynuzhdin
@dmitrynuzhdin 3 роки тому
Thanks man!
@Tammy_Ammy
@Tammy_Ammy 2 роки тому
Good Job buddy
@Bianchi77
@Bianchi77 3 роки тому
Cool info, thanks :)
@kristianhope5952
@kristianhope5952 3 роки тому
Awesome!
@andile5945
@andile5945 Рік тому
Hey Mitch, I cannot believe thsi is free, well i hope it isnt actually for you but this was an incredible tutorial. Thank you
@randomsoul00
@randomsoul00 7 місяців тому
great great great🙌👏
STM32 Guide #4: Generated Code, HAL, and Bare Metal
26:20
Mitch Davis
Переглядів 73 тис.
STM32 Guide #1: Your first STM32 dev board
12:12
Mitch Davis
Переглядів 186 тис.
Surprise Gifts #couplegoals
00:21
Jay & Sharon
Переглядів 22 млн
Завтра в школу с... | Шоу-квиз «Вопросики»
00:28
Телеканал СОЛНЦЕ
Переглядів 4,8 млн
PROTOCOLS: UART - I2C - SPI - Serial communications #001
11:58
Electronoobs
Переглядів 1,3 млн
Lecture 13: Timer PWM Output
16:47
Embedded Systems and Deep Learning
Переглядів 102 тис.
Bare-Metal MCU #9 - Review; ATTiny85 from scratch
14:25
Mitch Davis
Переглядів 60 тис.
Bare-Metal MCU #1 - Intro to registers
13:10
Mitch Davis
Переглядів 64 тис.
Stm32 Timers in PWM mode
37:44
Eddie Amaya
Переглядів 47 тис.
PWM and Timers :: Bare Metal Programming Series 3
1:11:25
Low Byte Productions
Переглядів 8 тис.
Can you solve this Oxford admissions question?
8:18
MindYourDecisions
Переглядів 54 тис.