Shawn, you structured it very well. 1hr Lecture shortened under 15 mins. Worth every sec spent on this video series.
@gorillaau3 жыл бұрын
It's info dense, but easy to backtrack if you miss something. I'm enjoying this tutorial, while arranging the hardware.
@kenwallace64934 жыл бұрын
Shawn may actually make HAL useful to us bare-metal skeptics. He goes a mile-a-minute but one can always stop and replay. Great stuff!
@Embedonix2 жыл бұрын
This engineer is the best in the business.... clear and concise and to the point! can not get any better!
@ak17ism4 жыл бұрын
Thanks Shawn! These videos are awesome, hope to see more STM32 tutorials regardless of the subject! it may be a wormhole, but it'd be interesting to see a generic getting started with TFT display (TFT, SDRAM setup and where to go on the data sheet to find these)
@iro3d3 жыл бұрын
A very useful video. Though it would have been easier to watch if there were at least a 1000 milliseconds pause between sentences.
@yellowcrescent2 жыл бұрын
Nice! Also, if you don't need any of the timer functionality (like triggering ISRs/callbacks or toggling pins), an easy way to measure times to the nearest millisecond is to use HAL_GetTick(), although you may have to handle overflow cases for very long-running systems (overflow happens after ~49 days and it wraps back around to zero). This function is already setup in HAL_Init(), so no additional setup is necessary. uint32_t start_time = HAL_GetTick(); // do something uint32_t total_time = HAL_GetTick() - start_time; // total time elapsed in milliseconds
@sixsunss80324 жыл бұрын
Your tutorial is so clear for a beginner! Thanks so much!!! Please keep it in this style and hope to see more videos from you!!! (only one suggestion, the opening music is quite loud compared to the rest of the video)
@thenoisyelectron4 жыл бұрын
Absolutely loving these STM32 tutorials! Thank you for putting time into these!
@flexi12324 жыл бұрын
first of all thank you for your videos, they are very helpful :) In this video at 9:44 u are saying that it also works if the timer rolls over zero. But if I run this code exactly the way u do it, this does not work... So I had to set the counter to zero after each second to avoid this. Did I make a mistake or how else should it work without this reset?
@Schmalik3 жыл бұрын
Same thing happening to me. How can you reset the timer?
@flexi12323 жыл бұрын
@@Schmalik i used __HAL_TIM_SetCounter(&htim16, 0); to reset the timer to zero
@MathewPanicker10103 жыл бұрын
@@flexi1232 i was searching to see if anyone mentioned this! thanks
@timothynguyen43054 жыл бұрын
Thanks Shawn for these videos! From a second year EE student :)
@hamedelahi22493 жыл бұрын
Thank you so much for these videos. I saw the whole 6 videos. They are really excellent. Can you continue these videos? I will see all of them. And I also like to know about TFT LCDs and more other examples.
@kiddjmadd4 жыл бұрын
Love the use of "sprintf!" Had my encoder (also a subset of timers) sending data, but I'd hit a wall trying to get a comprehensible value to the serial interface. Matching my code to the video confirmed encoder was working as expected without needing to mess with the raw hex that I'd been trying as a first pass.
@bobesfanchi4 жыл бұрын
This was an excellent video. I was looking for the definition of callback function and I came across this video and learned a lot.
@xptodundee4 жыл бұрын
Thanks for video - great series btw; in the interrupt case, I would "if (htim->Instance == TIM16)" which is an included definition in the HAL - this would make things more compatible should the viewers ever want to move that callback out of the main.c (without having to extern htim16 for example)
@BEdmonson852 жыл бұрын
Thanks for this, just what I was looking for...
@goodwill76433 жыл бұрын
Will wait for new series. Thank you!
@LOLWUT2814 жыл бұрын
Maybe Shawn knows but for everyone else, there's a built terminal in the STM program. Near the bottom right, on that 'console' tab if you lick the icon next to the pc monitor.
@ShawnHymel4 жыл бұрын
I've played with it, and it seems to give me a console out of the IDE or to my PC. I couldn't ever seem to get it to give me a serial connection to my board, so I stuck with using an external program for that. I'd definitely love to know if there's a way to open a serial connection! Maybe I just missed something.
@georgeborsa53464 жыл бұрын
He's right. It works just as good as Putty. imgur.com/a/mfOAMig The "Arduino" named board is a Nucleo-G474RE.
@ShawnHymel4 жыл бұрын
@@georgeborsa5346 Good to know, thanks!
@ephitous4 жыл бұрын
These videos are gold. Thanks!
@electronichome11532 жыл бұрын
Great course, Shawn, many thanks!
@Manonsilvermountain3 жыл бұрын
Great video, and I'm learning a lot, but haven't forgot to show how to enable UART2 in configuration wizard, and what mode to choose?
@younes29562 жыл бұрын
Do you know to enable the UART2 in configuration
@noopursirmokadam79864 жыл бұрын
Hi Shawn Hymel I am working on a simple implementation that checks each character being received using HAL_UART_Recieve_IT and when or is recieved it gets copied to another buffer. I have enabled USART as a global interrupt and wish to know how and where to use the Receive call back function. I am stuck and confused about this from a long time.
@winstonsabellona22043 жыл бұрын
thanks. i hope there will be more of this series about stm32 and nucleo dev board
@zetaconvex19873 жыл бұрын
Very useful series. Thanks for these videos.
@m-electronics59779 ай бұрын
Are existing other tutorials to make this only in CMSIS? Because learn the HAL with complete other names isn't productive when you had start with the CMSIS.
@JinFeeiLoh9 ай бұрын
9:48 if (__HAL_TIM_GET_COUNTER(&htim16) - timer_val >= 10000)... isn't correct (missing cast). You need to do something like this: uint16_t tim16 = __HAL_TIM_GET_COUNTER(&htim16); if ((uint16_t)(tim16 - timer_val) >= 10000){ // ... do something timer_val = tim16; }
@nukulkhadse52533 жыл бұрын
So do we take value of HCLK or APB1/APB2 Timer clock to prescale upto 1 MHz? Asking because you said if we change the mulplier and prescaler values of HCLK then we will have to consider different values.
@kenwallace64934 жыл бұрын
This may be a dumb question but why don't we just use the timer rollover interrupt handler to write our LED toggle code? It would normally appear above main. What's the purpose of callback functions??
@mkashty19994 жыл бұрын
This was an excellent video. Thanks a lot man!
@Frisky0563 Жыл бұрын
Hi there is there a calculator for STM32 to help me figure out how to setup clocks, prescaler, multipliers output capture for 833.33 microseconds. I’m using the 476RG 106RG nucleo boards thank you.
@sdp84833 жыл бұрын
These videos are super helpful. Thanks!
@coadi4 жыл бұрын
Great video. Maybe in the future you could also do one on RTC and sleep/stop/suspend. Thx again.
@RenegadeFury3 жыл бұрын
At 10:00 this shouldn't work after a while right? If timer_val is 65,000, then __HAL_TIM_GET_COUNTER(&htim16) runs, this will give a value like 400, since it rolled over 400-65,000 >= 10,000 is false Unless maybe you do some casting, but then it will almost always be true You have to reset the timer, or have some extra logic
@MathewPanicker10103 жыл бұрын
indeed, you have to account for roll over manually, or reset counter to zero using __HAL_TIM_SET_COUNTER(&htim, 0);
@samsman007 Жыл бұрын
Why Timer16 in the first place? Or could it just be any other timer?
@angelaguilar4972 ай бұрын
I have two assignments that are based on timers, one based on a normal timer and the other a countdown timer. Does anyone know where I can get help?
@jusroc63532 жыл бұрын
Just a quick question on the subject. I am fairly new to Embedded electronics. I am planning to design a midi control surface that incorporates lots of rotary encoders on (as many as possible). I was wondering how I could ascertain how many GPIOs that have "attached" interrupts on them. Would be grateful for any advice here. Otherwise keep up the good work! thanks
@lucky716tw3 жыл бұрын
Amazing tutorial! Thank you very much
@SurvivalSquirrel Жыл бұрын
Keep up the good work!
@farvezfarook34223 жыл бұрын
It would be nice to know how to register callbacks for individual timers
@FedericoSpada134 жыл бұрын
Why if i set Period=0, timer doesn't run? I would like to generate an update event at every tick, which would require a Period=1-1, that would make sense... I know I can change the prescalar value to obtain the same update frequency but this "-1" is quite stupid...
@surendramaharjan31292 жыл бұрын
Thank You!!! Please make a video on HAL Systick Timer.
@bennguyen13134 жыл бұрын
It's interesting that Timer's 'auto-reload preload' can be set to Disable, and you don't need to manually reload the counter in code! Regarding using a Timer for polling elapsed time, how does it differ from using HAL_GetTick(), i.e. no Timer? If using the Timer to trigger an ADC reading.. it seems the number of samples captured for an input sine-wave (single cycle), is dependent on the number of channels in the Scan. In other words, if NbrOfConversion=1, then the ADC will capture samples equal to the Timer rate.. but if NbrOfConversion>1, then only one channel gets converted per trigger event, the next channel in the scan list is captured only on the next trigger event? Speaking of Output-Compare, what does the "Pulse" field do? It seems it's necessary to be set to 1? For example, if Output-Compare is set to to Toggle on Match, with Trigger TRGO Event = Update , and if the Timer Clock is 120Mhz (Prescaler = 60-1, Preload 62-1), then the Ouput-Compare GPIO should toggle at 32khz.. so assuming one channel in the Scan list, how often will the ADC sample the channel?
@jusroc63532 жыл бұрын
what a great tutorial!
@chrisblain70652 ай бұрын
Curious why you picked TIM16 when TIM2 can go so much longer without resetting...
@adaminsanoff3 жыл бұрын
Why you left the variable "uart_buf_len" type int not uint16_t?
@igabo954 жыл бұрын
Great Video, thank you so much.
@himanshujangra25994 жыл бұрын
awesome video! can you please make a video on using stm32 as a usb HID device
@abhishekkuksal57004 жыл бұрын
Please add these 2 parts in your STM32 playlist!
@MrWATCHthisWAY4 жыл бұрын
I wasn’t aware of all the clock functions that were imbedded in this astm32. This will take awhile to grasp, and to find new applications. Just thinking about it hurts. 😔
@ShawnHymel4 жыл бұрын
It's a lot! That's why I had to only focus on a few functions at once with the video. I still don't know how to use all of the features (or even what some of them mean!). One step at a time..learning how to measure time (such as milliseconds) is a good start :)
@MrWATCHthisWAY4 жыл бұрын
Shawn Hymel - it May take a team!
@JerryHoward883 жыл бұрын
This was really helpful!
@RixtronixLAB3 жыл бұрын
Nice video, keep it up, thank you :)
@victorgomez3354 жыл бұрын
I love these videos
@electroquests9 ай бұрын
Thanks for the video!
@sidharthap4 жыл бұрын
what are callbacks and why are they called so?
@ShawnHymel4 жыл бұрын
Callbacks are functions that you define in your code that are called from somewhere else (usually in a library or back-end). Often, a pointer to the function can be passed as an argument to that back-end code so that you can name the callback function whatever you want. It allows you to define a function and let something else call it, even if you don't know when that will be (they form the basis for event-driven programming). Here is a good example of how a callback might work in C: stackoverflow.com/questions/142789/what-is-a-callback-in-c-and-how-are-they-implemented
@seferideveloper69332 жыл бұрын
Amazing tutorail
@AlanAlan20016 ай бұрын
6:45 UART
@ArtemKanash4 жыл бұрын
perfect! Thanks a lot
@emregngr88294 жыл бұрын
I hope It will be continue
@pancogito5613 жыл бұрын
Where is video about PWM???
@RobertLugg2 жыл бұрын
Great stuff
@mikes50253 жыл бұрын
Thank you very much
@Xsses4 жыл бұрын
Shawn, I think you forgot about digital inputs.
@clivedsouza6213 Жыл бұрын
This dude rips.
@AlexEduardoRR4 жыл бұрын
Thanks!!!
@mohammadhasanshokoohi71506 ай бұрын
Awesome
@KR-pj6ol3 жыл бұрын
more videos please ........................................!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!........................................!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@prachipatil36994 жыл бұрын
Hi Digikey....can I have a sample of nucleo board from you 😊😊.
@khanhluat89963 жыл бұрын
.
@talgtalga37673 жыл бұрын
to much bla bla no examples for beginners as simple
@mekbots76074 жыл бұрын
you explaining really fast .relax mate .why you explain difficult