I added the STM32CubeMonitor as a response to one of the commentators. Thank you for that suggestion. It's a really nice program with a lot of features. 576861742064696420746865206361742066696E643F. I hope you enjoy this video. I probably should have split this video into two videos since it is rather long and the installation of programs is a good way to induce sleepiness.
Your book arrived this week and I'm looking forward to working through it. May I make a suggestion for the videos: Consider numbering your episodes. Future viewers will no doubt arrive at individual episodes via search results and it will be a lot easier to seek out info they need to fully get a video's topic if they know where not to look! Thanks again--learned a lot from your AVR videos and looking forward to learning a lot from these!
Patrick, Excellent video on the ST development tools. Your video was great to show these quality tools from ST. I especially liked the idea of using the IDE to identify an appropriate ST chip for use in a project. That was enough to get me to install the 3 tools. More stuff to learn. It never ends. But, it's all for a good cause. Thank you for all your detailed instructional videos and your excellent book.
This was a huge help. I have your book and I just got the advanced ARM kit from your store (and switched to the videos instead of the book for now obviously). I didn't want to install java, and when I looked at the STMCubeMonitor GUI I was lost until I got to your explanation at the end. I can see my testSeconds increasing. Pretty exciting! haha
I really do appreciate the work you're putting in, I've been working with arduino's in classes for years, and I really wanted to learn how to design a microcontroller circuit for personal projects and classes. I'm so happy youtube recommended this video series to me!
Great tutorial! Thanks for making these! One thing to make it better (if possible) is to lower the gain of your mic and place it closer to your mouth. This can likely minimize the noise in your voice.
Hi, thank you for the amaizing work, it really helps me understan microcontrollers on the lowest level. May I ask what is the job of the capacitor between the VCC and the ground?
thank you, the stm studio was one software that i often neglected.. gotta try it out! using vscode with the cortex-debug extension.. STs software look far more refined, though vscode comes with its own pros..
Great series. I really enjoyed the last one, it was simple and straight forward. May I suggest dumping the other tools. Please stick to STM32CubeIDE it's packed with lots of tools already. From upgrading the STLink to it's power monitor. Don't over compliment things you have a simple custom dev kit, why not a simple environment. They might be useful tools but not necessary for this series. Just a suggestion. Keep up the good work!
@@PatrickHoodDaniel Yes that's correct it was more of a way to illustrate the tools on the IDE. Please check if "Live Expressions" or "expression" is suited for your purposes. Should be on the right hand side alternatively it should open automatically when in debug mode.
Thanks for the tuto. I Bought your book prior knowing you made a video tutorial. I have 2 questions for now. 1- I remember in one the video you talked about a MAX6xx to keep the tension good. 2- I'm still new in embedded systems and I am wondering if in later episodes you will talk more about the different layer of the STM32? Like HAL... In your book I find it hard to follow and understand. Well it's hard for a noob like me 😉 Thanks for those videos.
The Max603 and Max604 is a low dropout regulator. These ICs are great when using batteries for your project. For instance, if your project needs 5 volts to work, the low dropout regulator will only require four 1.5V batteries. If you use a standard regulator, like the 7805, you would need to add more betteries because the regulator drops the voltage (higher dropout). My current videos does go into HAL, especially the newer videos. I cover all apeects of the STM32 (register level, HAL, CUBEMX, etc.).
The OEM ST-LINK V2 didn't like a USB hub, had to connect direct to USB on the PC. it's recognized and upgraded using cube prog but now the stupid thing doesn't see the STM32F030. The clone st link v2 could see the target no prob. hmmm someone said the speed might be too fast, connect NRST this is the problem I've found with trying to learn microcontrollers, can't even get started with them, so many issues just to get going.
nice video for beginners with STM! I've a general question about the design of your breakout board.. your paths for the different pins have different lengths as it seems. won't it lead to problems due to different signal runtime because one path is longer than another? or is that issue not present with controllers like the STM?
I have not put into any problems with noise issues due to the length of the choices. The breadboards themselves have far more metal and more likely to receive noise.
succinct and easy to follow, thank you for taking the time to post. I have purchased your book too. Quick question, for the pin connections to the st-link on your board, what did you do to make the pins high enough to accept the wires? Video length was good and glad you kept all the installs in one place :)
I used extra long single row headers. The pins are easy to remove. I remove numbers 64, 63, 49 and 46, then I slide the longer ones into those positions. Let me know if you would like to see a video on how I do this.
@@PatrickHoodDaniel clever way to do it, I did not remember the pins were easy to remove, but now remember having to reposition pins on occasion when a pin did not go into breadboard correctly. No need for further video, thanks for the tip :)
Dear Patrick, Can I use a Black pill board to follow your videos, and book (which I already bought)? I a live in Brasil, and it is a nightmare to import electronic stuff here. Your videos are the best in the YT. Thank you for all the effort. Regards.
@@PatrickHoodDaniel Thank you very much. ASAP I will buy your board (one kit) mu brother lives in the US, but even if he send it to me by mail, it stops in customs, months, sometimes. Your board is a example of clean design! Best regards. Dimitrios
When running the debuggers, be sure to press 'stop' when you are going to do something else. Otherwise, they won't behave properly. Also, I first put the testSeconds inside of main() and the debugger couldn't find that variable...moved it to a global.
would this work with a mkl25z128vlh4 microcontroller? It is a Kinetis Chip made by NXP. I am trying to fix a scoreboard that had all damaged microcontrollers
You will need to find an IDE and libraries compatible with that microcontroller. Check out NXP's website. They may have an IDE that works with that line of MCUs.
Thanks for this awesome series. I have been able to follow this tutorial and achieve the same results with stm studio. I even tried it (studio) out with my own setup of a potentiometer, and it worked just fine. However, it has failed with my new project that reads load cell data through an hx711 amplifier and sends it via uart to serial. when I load the elf file in stm studio, I see a lot of variables except the only one I'm interested in which are the readings from the hx711. I receive the data well in a serial monitor and console but haven't been able to see my data as a variable in stm studio which would be quite helpful given its excellent graphing and real time monitoring. what could be the problem?
I think I got a bad ST-LINK, firmware upgrades don't stick, what's the exact upgrade procedure? I think you just unplug and plug it back in to get into DFU mode? i ordered a new one from STmicro
Wow The setup is huge but I think this is just part of the process. I guess that you recommend this IDE for a lot of reasons I can't see, but may I ask if there's a more simpler IDE? I'm a begineer in embedded systems. Thank you Patrick!! Very nice series so far!
This is actually the simplest way to go. If you want to go with an IDE that is the bare minimum, the setup is actually very difficult. I may get into these in the future.
@@PatrickHoodDaniel Thank you for the quick response! I was thinking of the ease of development for example, could we use Visual Studio Code for future development?
@@sustainableCode Yes, you can use Visual Studio Code and also Visual Studio. STMicro put out videos on using Visual Studio, and I have seen some information on the Visual Studio Code. I haven't done it, but I believe there is a bit of setup to make it work.
Hi, question: From the electronics perspective, why do you connect the 3 VSS and 2 VDD signals to the power rails on the breadboards? Wouldn't 1 VSS/1 VDD be sufficient? I can only guess for redundancy in case any of the signals fail but maybe you can give me a much better explanation
I wish. Funny, back 5 years go when I was dabbling in ARM, I thought the same thing. You would figure that the VDD and VSS lines would be connected internally, but no. There is a good reason; however. The different power connections relate to different features, so when you are needing to reduce power, you only need to connect the power that you need for the features that you use.
Why didn't you connect all the GND and Power lines on the PCB, and also the 0.1uf bypass caps? You could have also added a connector to plug the ST-Link programmer. Would have reduced jumper wires, etc.?
My aim for this series is to show the viewer an alternative that only includes the bare chip so it is better understood the connections and components that are added. This will give the person doing the projects a more intimate connection to the overall project.
Whenever I try to run the program I get an error: Error in initializing ST-LINK device. Reason: No device found on target. I believe I have checked and double checked all the previous steps. Unplugging the ST-Link V2 changes the error, I believe my laptop is recognizing it. Does anyone know what the error is/how to rectify it? I'm on an M1 Mac if that matters.
I received my kits and book and started with the videos. I get an Error in STM Studio, Error: Dwarf Error: wrong version in compilation unit header (is 5, should be 2,3, or 4) in the TestStudioAnbd Monitor.elf file. I have installed the latest versions of all the software, even uninstalled and reinstalled everything and no luck. Any Ideas? Really looking forward to the rest of the Tutorials and books, great job!
Hi Patrick, I've been following your channel since the AVR series and I'm very happy that you started making MCU videos once again. One thing in your video caught my eye. At 13:47 you started deleting the auto generated comments. These comment blocks create a persistent block of user code that does not get deleted once you hit the autogenerate button, for instance when you need to reinitialize some peripheral, change clock speed etc. During the autogeneration the IDE runs through all files and searches for these blocks and copies them into the newly generated files. Another point that I learned during my ARM journey is that these MCUs are quite powerfull in terms of clock speed and memory pool, especially RAM, to the point where using C++ instead of pure C is the preferred way to go. Obviously you need to constrain your programming by not using advanced C++ features like exceptions, STL library as it heavily uses heap allocation, and run time type information (RTTI). The usage of C++ comes handy especially in large projects.
Thanks for the recommendations. I will follow these recommendations in the following videos or at least mention issues that could be cause if veered off.
These are called decoupling capacitors. There are electrical noises all around us in the air that we cannot see. The breadboard and the traces on PCB act like antennas sucking up all these noises. The capacitors take these noises and smooth them out with their remarkable ability to act like a little battery (voltage storage device), outputting a smooth voltage from a noisy input. These capacitors "decouple" the noisy voltage from the very sensitive microcontroller.
The series uses a more appropriate IDE STM32CubeIDE rather than the CoIDE. I am also wanting to show the development of complete project with applications. I explain this in the first video in the series.
Thank you very much for this video series. I have learned more in this three videos than in weeks of random research.
That's awesome!
I added the STM32CubeMonitor as a response to one of the commentators. Thank you for that suggestion. It's a really nice program with a lot of features. 576861742064696420746865206361742066696E643F. I hope you enjoy this video. I probably should have split this video into two videos since it is rather long and the installation of programs is a good way to induce sleepiness.
Very well done - Looking forward to your next video. Many thanks
@@mic03311 Thanks!!
I really enjoy your detailed explanation of things. I haven't done any microcontroller work in many years and this has been very helpful! Thanks
Glad it was helpful!
Excellent tutorial. To give you something back for the time I have purchased your book. Nice work!
Wow! I am grateful!
Your book arrived this week and I'm looking forward to working through it. May I make a suggestion for the videos: Consider numbering your episodes. Future viewers will no doubt arrive at individual episodes via search results and it will be a lot easier to seek out info they need to fully get a video's topic if they know where not to look! Thanks again--learned a lot from your AVR videos and looking forward to learning a lot from these!
Great suggestion. I did this to my last series and it even helped me!
Patrick,
Excellent video on the ST development tools. Your video was great to show these quality tools from ST. I especially liked the idea of using the IDE to identify an appropriate ST chip for use in a project. That was enough to get me to install the 3 tools. More stuff to learn. It never ends. But, it's all for a good cause.
Thank you for all your detailed instructional videos and your excellent book.
This was a huge help. I have your book and I just got the advanced ARM kit from your store (and switched to the videos instead of the book for now obviously). I didn't want to install java, and when I looked at the STMCubeMonitor GUI I was lost until I got to your explanation at the end. I can see my testSeconds increasing. Pretty exciting! haha
Nice!!
I really do appreciate the work you're putting in, I've been working with arduino's in classes for years, and I really wanted to learn how to design a microcontroller circuit for personal projects and classes. I'm so happy youtube recommended this video series to me!
Great tutorial! Thanks for making these!
One thing to make it better (if possible) is to lower the gain of your mic and place it closer to your mouth. This can likely minimize the noise in your voice.
Ok. I'll try that.
Hi, thank you for the amaizing work, it really helps me understan microcontrollers on the lowest level.
May I ask what is the job of the capacitor between the VCC and the ground?
That is a filter capacitor. I talk about that here: ua-cam.com/video/YA2w7eH-j1k/v-deo.html
thank you, the stm studio was one software that i often neglected.. gotta try it out!
using vscode with the cortex-debug extension.. STs software look far more refined, though vscode comes with its own pros..
Great series. I really enjoyed the last one, it was simple and straight forward. May I suggest dumping the other tools. Please stick to STM32CubeIDE it's packed with lots of tools already. From upgrading the STLink to it's power monitor. Don't over compliment things you have a simple custom dev kit, why not a simple environment. They might be useful tools but not necessary for this series. Just a suggestion. Keep up the good work!
Are you referring to monitoring power consumption? I am not familiar with tools in the STM32CubeIDE that can monitor variables in real time.
@@PatrickHoodDaniel Yes that's correct it was more of a way to illustrate the tools on the IDE.
Please check if "Live Expressions" or "expression" is suited for your purposes. Should be on the right hand side alternatively it should open automatically when in debug mode.
This video series is really amazing!
I e been waiting all week. Thanks!
Nice!!!
Great video, as always!
Glad you enjoyed it!
I recently purchased your development kit. Do you have any documentation regarding the pins? How would I know which one is which?
Here you go: newbiehack.com/categories/newbiehack-ARM-tutorial
@@PatrickHoodDaniel thanks!
thank you for this great tutorial
Of course, you are welcome.
Nice video. Could you please show schematic besides breadboard so that it would be easy to understand the connections.
Yes, I will do this in the following videos. Thanks.
Very nice video, keep up the good work 👏
Thanks!
Thanks for the tuto. I Bought your book prior knowing you made a video tutorial.
I have 2 questions for now.
1- I remember in one the video you talked about a MAX6xx to keep the tension good.
2- I'm still new in embedded systems and I am wondering if in later episodes you will talk more about the different layer of the STM32? Like HAL... In your book I find it hard to follow and understand. Well it's hard for a noob like me 😉
Thanks for those videos.
The Max603 and Max604 is a low dropout regulator. These ICs are great when using batteries for your project. For instance, if your project needs 5 volts to work, the low dropout regulator will only require four 1.5V batteries. If you use a standard regulator, like the 7805, you would need to add more betteries because the regulator drops the voltage (higher dropout).
My current videos does go into HAL, especially the newer videos. I cover all apeects of the STM32 (register level, HAL, CUBEMX, etc.).
@@PatrickHoodDaniel thanks alot!
The OEM ST-LINK V2 didn't like a USB hub, had to connect direct to USB on the PC. it's recognized and upgraded using cube prog but now the stupid thing doesn't see the STM32F030.
The clone st link v2 could see the target no prob.
hmmm someone said the speed might be too fast, connect NRST
this is the problem I've found with trying to learn microcontrollers, can't even get started with them, so many issues just to get going.
nice video for beginners with STM!
I've a general question about the design of your breakout board..
your paths for the different pins have different lengths as it seems. won't it lead to problems due to different signal runtime because one path is longer than another?
or is that issue not present with controllers like the STM?
I have not put into any problems with noise issues due to the length of the choices. The breadboards themselves have far more metal and more likely to receive noise.
I have to buy a non Mac pc so I can follow you. I have to get back to my feet financially but I intend to buy your book too.
This software will work on Mac, Linux, and Windows with the exception of STM Studio, but you can use STM32CubeMonitor instead.
succinct and easy to follow, thank you for taking the time to post. I have purchased your book too. Quick question, for the pin connections to the st-link on your board, what did you do to make the pins high enough to accept the wires? Video length was good and glad you kept all the installs in one place :)
I used extra long single row headers. The pins are easy to remove. I remove numbers 64, 63, 49 and 46, then I slide the longer ones into those positions. Let me know if you would like to see a video on how I do this.
@@PatrickHoodDaniel clever way to do it, I did not remember the pins were easy to remove, but now remember having to reposition pins on occasion when a pin did not go into breadboard correctly. No need for further video, thanks for the tip :)
@@dalevanderzee4086 Not a problem. Ithink it also helps with noise reduction since breadboard are notorious for bing rather noisy.
Dear Patrick,
Can I use a Black pill board to follow your videos, and book (which I already bought)? I a live in Brasil, and it is a nightmare to import electronic stuff here.
Your videos are the best in the YT. Thank you for all the effort.
Regards.
Yes you can. You will need to use the ST-Linkv2 programmer and connect it to the SWDIO and SWCLK connections on the black pill board.
@@PatrickHoodDaniel Thank you very much. ASAP I will buy your board (one kit) mu brother lives in the US, but even if he send it to me by mail, it stops in customs, months, sometimes. Your board is a example of clean design!
Best regards.
Dimitrios
When running the debuggers, be sure to press 'stop' when you are going to do something else. Otherwise, they won't behave properly. Also, I first put the testSeconds inside of main() and the debugger couldn't find that variable...moved it to a global.
Yes, the declaration of testSeconds must be located outside of the main(). Thanks for the tip on the debug operation.
would this work with a mkl25z128vlh4 microcontroller? It is a Kinetis Chip made by NXP. I am trying to fix a scoreboard that had all damaged microcontrollers
You will need to find an IDE and libraries compatible with that microcontroller. Check out NXP's website. They may have an IDE that works with that line of MCUs.
Thanks for this awesome series.
I have been able to follow this tutorial and achieve the same results with stm studio. I even tried it (studio) out with my own setup of a potentiometer, and it worked just fine. However, it has failed with my new project that reads load cell data through an hx711 amplifier and sends it via uart to serial. when I load the elf file in stm studio, I see a lot of variables except the only one I'm interested in which are the readings from the hx711. I receive the data well in a serial monitor and console but haven't been able to see my data as a variable in stm studio which would be quite helpful given its excellent graphing and real time monitoring.
what could be the problem?
Are you adding the volatile to the variable? Is it a global variable?
@@PatrickHoodDaniel Made it a global variable and then all worked fine. previously, I'd placed the variable under the main function.
Thanks
I think I got a bad ST-LINK, firmware upgrades don't stick, what's the exact upgrade procedure? I think you just unplug and plug it back in to get into DFU mode? i ordered a new one from STmicro
Yes, DFU mode is just an unplug and plug back in. When you get the other one, can you send me the bad one so I can play with it?
Wow The setup is huge but I think this is just part of the process. I guess that you recommend this IDE for a lot of reasons I can't see, but may I ask if there's a more simpler IDE? I'm a begineer in embedded systems.
Thank you Patrick!! Very nice series so far!
This is actually the simplest way to go. If you want to go with an IDE that is the bare minimum, the setup is actually very difficult. I may get into these in the future.
@@PatrickHoodDaniel Thank you for the quick response! I was thinking of the ease of development for example, could we use Visual Studio Code for future development?
@@sustainableCode Yes, you can use Visual Studio Code and also Visual Studio. STMicro put out videos on using Visual Studio, and I have seen some information on the Visual Studio Code. I haven't done it, but I believe there is a bit of setup to make it work.
@@PatrickHoodDaniel Excellent Patrick! I love the channel and this series, it's very easy for me to follow, again awesome work!
@@sustainableCode Thanks!
Hi, question:
From the electronics perspective, why do you connect the 3 VSS and 2 VDD signals to the power rails on the breadboards? Wouldn't 1 VSS/1 VDD be sufficient? I can only guess for redundancy in case any of the signals fail but maybe you can give me a much better explanation
I wish. Funny, back 5 years go when I was dabbling in ARM, I thought the same thing. You would figure that the VDD and VSS lines would be connected internally, but no. There is a good reason; however. The different power connections relate to different features, so when you are needing to reduce power, you only need to connect the power that you need for the features that you use.
Why didn't you connect all the GND and Power lines on the PCB, and also the 0.1uf bypass caps? You could have also added a connector to plug the ST-Link programmer. Would have reduced jumper wires, etc.?
My aim for this series is to show the viewer an alternative that only includes the bare chip so it is better understood the connections and components that are added. This will give the person doing the projects a more intimate connection to the overall project.
Nice video, but I away prefer Keil uvision with Cmsis instead of the stm32 cube and HAL!
What's the difference between Visual Studio Code verse STM Studio and the Cube Monitor?
Whenever I try to run the program I get an error:
Error in initializing ST-LINK device.
Reason: No device found on target.
I believe I have checked and double checked all the previous steps. Unplugging the ST-Link V2 changes the error, I believe my laptop is recognizing it. Does anyone know what the error is/how to rectify it?
I'm on an M1 Mac if that matters.
I received my kits and book and started with the videos. I get an Error in STM Studio, Error: Dwarf Error: wrong version in compilation unit header (is 5, should be 2,3, or 4) in the TestStudioAnbd Monitor.elf file. I have installed the latest versions of all the software, even uninstalled and reinstalled everything and no luck. Any Ideas? Really looking forward to the rest of the Tutorials and books, great job!
Problem: gdb symbol-file wrong version in compilation unit header...
Solution: Force dwarf version to 4
How: add the -gdwarf-4 compiler option
Project > Properties >
MCU GCC Assembler > Command = gcc -gdwarf-4
MCU GCC Compiler > Command = gcc -gdwarf-4
MCU GCC Linker > Command = gcc -gdwarf-4
More Info: gcc gnu org onlinedocs gcc Debugging-Options (-gdwarf-version)
@@tcdz01 Thank you!!😀
Got the Kindle version today. Is it possible to get the board in India ?
Yes, we can ship to India.
Hi Patrick, I've been following your channel since the AVR series and I'm very happy that you started making MCU videos once again. One thing in your video caught my eye. At 13:47 you started deleting the auto generated comments. These comment blocks create a persistent block of user code that does not get deleted once you hit the autogenerate button, for instance when you need to reinitialize some peripheral, change clock speed etc. During the autogeneration the IDE runs through all files and searches for these blocks and copies them into the newly generated files. Another point that I learned during my ARM journey is that these MCUs are quite powerfull in terms of clock speed and memory pool, especially RAM, to the point where using C++ instead of pure C is the preferred way to go. Obviously you need to constrain your programming by not using advanced C++ features like exceptions, STL library as it heavily uses heap allocation, and run time type information (RTTI). The usage of C++ comes handy especially in large projects.
Thanks for the recommendations. I will follow these recommendations in the following videos or at least mention issues that could be cause if veered off.
so all power should be connected?
Yes
why do you need the capacitors between + and - ?
These are called decoupling capacitors. There are electrical noises all around us in the air that we cannot see. The breadboard and the traces on PCB act like antennas sucking up all these noises. The capacitors take these noises and smooth them out with their remarkable ability to act like a little battery (voltage storage device), outputting a smooth voltage from a noisy input. These capacitors "decouple" the noisy voltage from the very sensitive microcontroller.
Why this ARM series is starting again on your channel?
The series uses a more appropriate IDE STM32CubeIDE rather than the CoIDE. I am also wanting to show the development of complete project with applications. I explain this in the first video in the series.
@@PatrickHoodDaniel thank you, true.. the cubeIDE is now the preferred one to start off with.. plus its free, and works on Linux too!
I thought You were going on about your RISCV.
Can you elaborate? Are you refering to the open source RISC-V instruction set that is fee-less and developed at UCBerkeley?