@@geneschroedertech7501doing embedded currently for work. So a foundational understanding is a must. I don't have much background in electronics and these systems have so many confusing configurations along with tons of acronyms. I've been watching a lot of Ben eaters electronic component videos which also help to understand some of the configuration for the different peripherals. It's a lot to take in for sure.
Thank you Gene! Loved hearing about your work with early processors like the 6502 in the last video. As a sophomore CS student this stuff is really helpful and interesting.
Thanks. Looking back, some things have changed a lot, and other things haven't changed at all. If you are interested in embedded, I suggest you take a class in operating systems. Good luck in your education and career.
I have a question about 12:04 - here, you bring up the system timer, which for our MCU you mention is a 1 ms tick. I'm wondering what this is used for? From the Clock Configuration tab in STM32CubeIDE, I'm not seeing any output clock frequencies on the order of 1 kHz. In one of my university classes, the word "tick" was used in the context of an RTOS kernel timer - does this perhaps have anything to do with it? Edit: Generating delays also comes to mind.
The system timer is a special timer defined by ARM as a "core" component. Thus, it is different from the general purpose timer peripherals. It is described in "ARM®v7-M Architecture Reference Manual" section B3.3. Normally, the system timer is used for the operating system "tick", for time-based operations, but it is really up to the software. In my software, which has no operating system, I use the system timer to drive the tmr (timer) module. In STM32CubeIDE, I would expect there is a way to set the system timer tick duration. However, it seems like it is hardcoded to be 1 ms. I think in startup code, you could change the duration to some other value, but this would take some investigation. The clock configuration is lower level configuration, but there is a connection to the system timer. Specifically, you can control the clock frequency that is the INPUT to the system timer hardware. The system timer hardware divides this frequency by a constant value (set in system startup code) in order to obtain the 1 kHz system timer rate.
Sir it's the best lesson I've ever heard. Sir i have one doute that you said that when an interrupt is triggered, the CPU shall stop what it doing and run the interrupt program, let us consider a drone have a stm32 microcontroller in its flight controller unit and the drone flying at some altitude so its measuring the altitude refrance and roll and pitch inputs by that time I've increase the throttle a bit so by that an interrupt is triggered if it stops measuring the roll and pitch and just run the interrupt program how can a drone maintain its stability is there any chance that cpu can do two jobs at a time ?
Often the interrupt handler code will be very quick. For example, there might be an interrupt when an A-to-D conversion is complete. In the interrupt handler code the MCU might read the A-to-D value and store it in a variable, and then immediately return. Then the MCU will resume what it was doing. The interrupt might only take a few microseconds and will not cause much delay. For a real-time system like a drone, an important part of the software design is to make sure you have enough time to read the sensors and perform the control loop calculations to determine motor outputs. There might be interrupts as well so this interrupt handling time must be accounted for. A more advanced design might be able to use a DMA controller instead of using interrupts, but this depends on many details.
As a beginner try to take it slowly and try to understand the material the best you can. Feel free to ask questions in the comment section. Others might have the same questions as you.
This has got to be one of the most valuable embedded tutorial series on the internet. I can't thank you enough for doing these.
Thanks for your kind words. Comments like this give me motivation to do more courses. I am currently working on my 6th one.
@@geneschroedertech7501doing embedded currently for work. So a foundational understanding is a must. I don't have much background in electronics and these systems have so many confusing configurations along with tons of acronyms. I've been watching a lot of Ben eaters electronic component videos which also help to understand some of the configuration for the different peripherals. It's a lot to take in for sure.
There is a lot to learn, but I found the more you do, the more the pieces fit together, and it makes sense. Best wishes for success in your career.
@@geneschroedertech7501 btw, I forgot to mention I plan to watch all of your other videos too. Very interested in what else I can learn! And tyvm!
Best STM32 course available. Wish I had found it sooner. Thank you so much.
Thank you for your kind words. I hope it helps you in your career or hobby.
Such a wonderful explanation about microcontroller. This is making to watch the entire course.
Thank you! I find that being able to picture what is inside the MCU helps to reduce mystery and makes it easier to learn about.
Brilliant video. Crisp,to the point and very informative
Glad you liked it. I think having a picture in your mind of how an MCU is organized is very important.
@@geneschroedertech7501 absolutely
Thank you Gene! Loved hearing about your work with early processors like the 6502 in the last video. As a sophomore CS student this stuff is really helpful and interesting.
Thanks. Looking back, some things have changed a lot, and other things haven't changed at all. If you are interested in embedded, I suggest you take a class in operating systems. Good luck in your education and career.
Awesome course! Thank you Gene!
👍
Glad you like it!
Very good job explaining the architecture of the STM32 or most MCUs
Thanks, I think understanding architecture can really help you as a developer.
Lovely explanation and great overview. Looking forward to watching the rest of the series
Thank you! Critical comments welcome also.
The Microcontroller System on a Chip diagram is excellent.
Thanks!
I am trying to get into embedded firmware job this will come in handy for sure thank you.
Thanks for your message. Good luck in your career!
Thank you for this course!
You are welcome - I hope it does not become too boring :)
Very clear explanation.
Glad you liked it - I think understanding architecture helps make many things more clear.
I have a question about 12:04 - here, you bring up the system timer, which for our MCU you mention is a 1 ms tick. I'm wondering what this is used for? From the Clock Configuration tab in STM32CubeIDE, I'm not seeing any output clock frequencies on the order of 1 kHz. In one of my university classes, the word "tick" was used in the context of an RTOS kernel timer - does this perhaps have anything to do with it?
Edit: Generating delays also comes to mind.
The system timer is a special timer defined by ARM as a "core" component. Thus, it is different from the general purpose timer peripherals. It is described in "ARM®v7-M Architecture Reference Manual" section B3.3.
Normally, the system timer is used for the operating system "tick", for time-based operations, but it is really up to the software. In my software, which has no operating system, I use the system timer to drive the tmr (timer) module.
In STM32CubeIDE, I would expect there is a way to set the system timer tick duration. However, it seems like it is hardcoded to be 1 ms. I think in startup code, you could change the duration to some other value, but this would take some investigation.
The clock configuration is lower level configuration, but there is a connection to the system timer. Specifically, you can control the clock frequency that is the INPUT to the system timer hardware. The system timer hardware divides this frequency by a constant value (set in system startup code) in order to obtain the 1 kHz system timer rate.
@@geneschroedertech7501 This helped clear it up, thanks Gene!
@@geneschroedertech7501 Thought I replied, seems it's not showing up. Thanks so much Gene, this really helps!
Sir it's the best lesson I've ever heard. Sir i have one doute that you said that when an interrupt is triggered, the CPU shall stop what it doing and run the interrupt program, let us consider a drone have a stm32 microcontroller in its flight controller unit and the drone flying at some altitude so its measuring the altitude refrance and roll and pitch inputs by that time I've increase the throttle a bit so by that an interrupt is triggered if it stops measuring the roll and pitch and just run the interrupt program how can a drone maintain its stability is there any chance that cpu can do two jobs at a time ?
Often the interrupt handler code will be very quick. For example, there might be an interrupt when an A-to-D conversion is complete. In the interrupt handler code the MCU might read the A-to-D value and store it in a variable, and then immediately return. Then the MCU will resume what it was doing. The interrupt might only take a few microseconds and will not cause much delay.
For a real-time system like a drone, an important part of the software design is to make sure you have enough time to read the sensors and perform the control loop calculations to determine motor outputs. There might be interrupts as well so this interrupt handling time must be accounted for.
A more advanced design might be able to use a DMA controller instead of using interrupts, but this depends on many details.
@@geneschroedertech7501 thanks very much sir i understand so interrupt handler will depend on refresh rate of the control loop.
Many thanks.
Welcome 😊
free college right here
Thanks!
I am a beginner in embedded systems I hope I will be able to crack embedded software systems.
As a beginner try to take it slowly and try to understand the material the best you can. Feel free to ask questions in the comment section. Others might have the same questions as you.
15:05
Super and nice course, slowly speaking for not english-native-mans, and carefull explanation :)
Thank you! I do try to pace myself when speaking to allow people to think about the material.
15:49