Stm32 Timers in PWM mode

Stm32 Timers in PWM mode

Eddie Amaya

6 лет назад

49,302 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@manardyab6268
@manardyab6268 - 30.03.2019 11:59

thanks for your very good demo but its hard for me to understand what i should write first and what should write at the end
can you upload the working code that you test ....

Ответить
@arunprakasan4948
@arunprakasan4948 - 27.04.2019 17:34

Hi..Your tutorials are awesome.Please do a tutorial on how to use RTC in STM32. Thanks in advance

Ответить
@roderickdiaz3834
@roderickdiaz3834 - 28.04.2019 17:34

If I want to have a Fixed frequency and the variable duty cycle (the problem is not the duty cycle) the problem is to set a frequency above 15khz which forms utilisations to establish in the code and have a similar output since they always appear only 1khz with the scope

Ответить
@vikasmarkanday6663
@vikasmarkanday6663 - 03.06.2019 05:45

wow... what a tutorial !!!

Ответить
@king998100
@king998100 - 13.06.2019 10:41

This is the best and most intuitive tutorial ever...

Ответить
@Awhobiwom
@Awhobiwom - 17.06.2019 00:55

Hi Eddie, thanks for the great tutorial.
How do I configure it if want to change the duty cycle each time I press the blue button (portA 0)

Ответить
@Ech01378
@Ech01378 - 06.08.2019 10:44

Hello, Thanks for the Video! I am trying to make my own board, but the problem is that when I program the micro using the stlink, it dies (smoking!). The thing is that I've designed Boot0 and Boot1 to GND directly with no resistor, and the OSC32_IN to GND and the OSC32_OUT to sink the current from a pair resistor-led connected to the 3.3v. Idk why it is burning my stm32f103c8 when I program it. Could you help me?

Ответить
@uber-jaianada
@uber-jaianada - 09.08.2019 02:29

DUDE! your presentation is superb and helps demystify and shorten the learning curve by A LOT! THANK YOU!!

Ответить
@linwei1390
@linwei1390 - 12.11.2019 18:26

Gesus thanks for making this!!!

Ответить
@imcnx1563
@imcnx1563 - 25.11.2019 21:12

hi, how to use logic analyzer with keil?

Ответить
@csxinfo1
@csxinfo1 - 19.01.2020 20:04

Hey great video, I'm looking for the datasheet and I can't found can someone gives me a link pls

Ответить
@ecarvalho17
@ecarvalho17 - 24.01.2020 04:17

Nice video. Do you plan to do a tutorial on PWM input too?

Ответить
@shayanghezelbash8938
@shayanghezelbash8938 - 17.02.2020 15:38

hey eddie nice video if you could just make a video wich you adjust a dc motor by this program what would be great ... :p

Ответить
@Diego4322237
@Diego4322237 - 21.02.2020 16:08

Excelente video. Thanks.

Ответить
@matteociofani2881
@matteociofani2881 - 28.02.2020 13:49

This video is incredibly useful!!!! I’ll see all the other in the playlist, thank you so much!!

Ответить
@timowolff1105
@timowolff1105 - 18.04.2020 21:37

Sir, this is a great informative video thank you so much for uploading this. However i got a question, if you want to create a „sinusoidal“ output at least for the motor pretended would you have to set a seperate register which changes the CCR4 register figure every period or how would you do this?

Ответить
@zlac
@zlac - 26.05.2020 21:36

So it's 4 PWM outputs max? Or is it 16?
As I understand it, there are 4 PWM timers so we can have 4 different (or same) time bases. Each timer can output to 4 different OC pins with different duty cycle so we can actually have 16 PWM outputs.
Or am I getting something wrong here?

Ответить
@buildlover9959
@buildlover9959 - 31.05.2020 01:49

Awesome! Very nice tutorial. Thanks man. Actually your waveform is pretty accurate because your actual prescaler is 72+1=73 and ARR value is 1000+1=1001, So (72Mhz/(73*1001))= 985.3 hz . May I know what kind of logic analyzer is that?

Ответить
@gerardelbers2882
@gerardelbers2882 - 02.06.2020 16:51

Hi. A small detail that I learned from a colleaugue. If you want to divide your clock by 72 you sould load PSC with 72-1 = 71 because counting from 0 to 71 is 72 intervals. You will see that your period will change from 985.4 Hz to 999.8 Hz. That's what you wanted. This is true for all counters (also ARR), if you want N then load value N-1.

Ответить
@annaoaulinovna
@annaoaulinovna - 06.06.2020 18:04

Why timer1 of stm32f103c disables moe bits every time? And how can we remap pa0- wakeup pin? timer2 channel 1 is mixed with pa0 wake-up pin. Why stm32f103c timer1 dont give good output over 0.7v when we use over 50khz 0.5 duty cycle.

Ответить
@jaydenyu8542
@jaydenyu8542 - 10.07.2020 05:52

Hi, How do you determine the pre scaler value?

Ответить
@guilhermeartuzo7630
@guilhermeartuzo7630 - 18.07.2020 18:36

Great lesson on PWM, the best one i've found so far ! I have just started to learn this concepts and this was really helpfull and informative. By the way, i think you should have tried 72-1 on the PSC register, that might be the thing you were looking for in the end.

Ответить
@lulighttec
@lulighttec - 31.07.2020 04:00

I have enjoyed watching these timer tutorials, and I plan to watch the others about the STM32, as I have a project that needs an MCU and I have limited knowledge and experience with them, so thanks for putting these together! Now, if you could do one on how to use these timer PWM to individually control several small bipolar steppers, say, using some L293D Quad H-bridges to drive the motors, that would be SUPER useful, especially if that could be expanded on to control more motors than the STM32 has timer channels... I feel like that might have something to do with Bitwise operations and Shift registers? After I have that part worked out, I can work on the rest of it.

Ответить
@phamquoctrung2207
@phamquoctrung2207 - 04.08.2020 06:22

thank u!

Ответить
@manisrinivas_hyd
@manisrinivas_hyd - 05.09.2020 18:41

Great video -
can you us how to create a project in keil?

Ответить
@rupeshjha7006
@rupeshjha7006 - 09.09.2020 12:03

Hi, Could you please help me with Phase shift in PWM.
Thanks

Ответить
@mehmetberatsen2150
@mehmetberatsen2150 - 16.09.2020 14:51

İ cant get an output via PB9 help please

Ответить
@zulkarnaine
@zulkarnaine - 03.12.2020 20:23

i need phase shift for this if you know please help

Ответить
@yvindaure2135
@yvindaure2135 - 14.12.2020 19:46

Can this do PWM phase shift?

Ответить
@ahmedsaeed234
@ahmedsaeed234 - 30.12.2020 03:28

I NEED PWM TO CONTROL SERVO MOTOR WHAT IS THE CHANGE I CAN DO IN THIS CODE??

Ответить
@GregLangford89
@GregLangford89 - 08.01.2021 03:01

Hey Eddie, thanks for the great videos do you know if there is a way with SWV to show an output waveform of a timer? In my case I am generating a PWM signal and I wanted to use something like SWV trace timeline to view the generated waveform, is this at all possible?

Ответить
@thomasbaars5948
@thomasbaars5948 - 18.01.2021 11:59

This video helped immensely, thank you very much.

Ответить
@julian10g
@julian10g - 25.02.2021 05:14

Thanks Eddie!

Ответить
@kenwallace6493
@kenwallace6493 - 02.03.2021 01:04

Still a great video for the bare metal folks. Carry on, Eddie.

Ответить
@AS-zs7jw
@AS-zs7jw - 06.04.2021 18:57

You selected alternate function for timer4 on PB9 , if there are more than one alternate function on a pin how we will select particular alternate function?

Ответить
@damianmelamed1706
@damianmelamed1706 - 14.04.2021 04:44

Hey man! i've found why the frequency was wrong. The preesclaer is set to "PSC + 1". So you were dividing 72MHz by 73000 resulting in 986Hz.
Besides thatt, it's just a great video

Ответить
@elifklnc6240
@elifklnc6240 - 25.05.2021 11:53

Hi Eddie !
I did not understand. How do we find the midpoint of the pwm signal ? Can you help me ?

Ответить
@BeMuslimOnly
@BeMuslimOnly - 21.09.2021 19:26

PSC should be 72-1 for 1 kHz frequency... Thanks for your video..

Ответить
@DS-ls7ck
@DS-ls7ck - 21.10.2021 15:58

The best explanation ever. English is not my language. Even I understood your explanation

Ответить
@practicallife3377
@practicallife3377 - 08.12.2021 09:08

your videos are awesome
Can you please provide a tutorial on DMA COMPARE MATCH IN PWM

Ответить
@MuhammadAbdullah-ch2ow
@MuhammadAbdullah-ch2ow - 10.01.2022 23:22

Thanks a lot👍 Really helpful tutorial. We didn't have enough time to study it in the semester but you saved me. Implementing this in my project. Works perfectly. Amazing work👍

Ответить
@phamngocat1564
@phamngocat1564 - 12.05.2022 19:19

thanks a lot <3

Ответить
@ShivamKumar-ky6vm
@ShivamKumar-ky6vm - 24.05.2022 22:30

What is the differnce between PWM and TIMERS IN PWM MODE ??

Ответить
@allinthefamiliy3122
@allinthefamiliy3122 - 10.08.2022 04:04

Thanks man, to me it was very helpful. The counter frequency is fpwm=fosc/((ARR+1)*(PSC+1)), that is why you had a difference on your logic analyzer.

I have a question I want to build a synchronous Buck Converter and need to use the PWM on TIM1 ch1..3 with it's complementary outputs and the programmable dead time for that. You talked about the fact that using TIM1 for PWM was not a good idea. The blue pill has these function only on TIM1 ch1..3 so what is the reason that you said that using TIM1 for PWM is not a good idea.
Anyone that can help me is appreciated.

Ответить
@aboabdo3516
@aboabdo3516 - 17.09.2022 16:10

Hi, please can i have the link for this stm32fxx datasheet you are using here?

Ответить
@fakharealiraza1205
@fakharealiraza1205 - 18.10.2022 22:08

hi eddie . I had one question. Is the desired frequency , the counter clock frequency? or the pwm frequency? which one is it?

Ответить
@sheikabdullah8475
@sheikabdullah8475 - 19.10.2022 20:37

Hi eddy, I'm using the same way how you did but with timer1 channel3 in stm32f103c8t6 (PA10), It is not working will you help me?

Ответить
@last-zura8899
@last-zura8899 - 24.08.2023 18:28

Thank you

Ответить