How to program STM32 microcontroller using Arduino IDE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] I artists Internet of Things and electronic solutions we support you to develop your knowledge and make your familiar with the latest technology and gadgets hello there today we are going to see how to program stm32 f1t cat6 our microcontroller board with the well known are you know ide coil of this video is to give you a very basic introduction to SD microcontrollers and make you familiar with the STM programming through arduino ide as you already know stm32f4 and three c eight pcs is a microcontroller ball given up by a stick microcontrollers and nowadays esti microcontrollers are getting much more popular among DIY getit developers do to speed calculations and the furry federal characteristics of the microcontrollers so today i am going to select a basic microcontroller made by st microcontrollers to start my video tutorial lesson series to stm32 stm32f4 ec8 t6 microcontroller with the development board which is also known as STM Bluefield is handy and most abundant SDM microcontroller board you can find easily in eBay or any other online store this microcontroller is funning at 72 minutes clock speed so it can execute 72 million instructions per second and this is very fast in comparison with our do you know uno which is running at 16 megahertz clock speed since this is 32-bit microcontroller you can access 32 bit long register at once compared to our do you know if you want to access 32 bit very well in our do you know oh no you need to access for 8-bit registers in sequential manner to store 32-bit data this will take much more executions and processing time since this microcontroller board is compatible with our do you know one can easily upload programs compiled using arduino ide to this board using the serial port so just like normal serial communication you can connect USB to serial converter with this microcontroller board to applaud program Here I am using CH 340 USB to serial converter to upload programs all the links where I bought the hardware components can find under the video description below the price for work item was around $5 since we are using arduino ide as the base for running the code we need to download our dunno compatible STM library board package first go to Arduino website and download the arduino ide zip file for none administer all now extract the arduino ide back and place it in any destination in the hard drive plug the USB serial adapter and open the arduino ide to check whether the hardware is correctly detected by the windows hardware manager if not you can direct into the driver folder in the arduino ide extract to find the drivers to the hardware if you are using CH 340 USB to serial converter you won't be able to find the drivers in the driver folder in that case you can go to the link in the description below to find the drivers for the hardware next step is to download all the required board manager files and libraries to the arduino ide to do this go to arduino ide tools board and click bots manager find 32-bit arm cortex-m 3 and click install if you cannot find the board in the board manager copy the link in the description below for arduino stm32 board and go to arduino ide file preference and paste the link in the additional word manager URL and click OK now we check the board manager to find the required board manager files and click install when the software is completely installed plus the arduino ide and go to arduino stm32 page on github link to this page can be find in the description section this is an arduino ide adorned solution for stm32 microcontroller created and maintained by roger claw pick the download zip file and unzip into the Arduino stm32 master directory and test the complete directory in the hardware directory of the arduino ide basically that's all our you know ide is now ready to program the stm32 microcontroller next thing which we need to do is to connect the USB to serial converter to the stm32 microcontroller board now this is very important keep in mind that stm32 is 3.3 volt tolerant microcontroller despite the fact that some pins are 5 world tolerance connecting other GPIO pins directly into the 5 volt signal line will definitely destroy the board to find 5 volt tolerance GPIO pins you can refer their datasheet so make sure that the connection to the USB serial converter are correct as you can see in the diagram here and this board of course you can see a small 3.3 volt voltage regulator connected to supply the power to the chip but that is only enough to power the microcontroller training much more power from the GPIO pins we will burn the regulator I see ok now let's see the problem of connections to the microcontroller board connect ground to ground 5 volt to 5 volt Rx from the serial converter to pin a 9 on the HTM 32 board and finally connect the TX from the serial to pin a ten then connect the programmer to the computer using USB table at this point led on the board should start to fash indicating the power has received to the board and now you are ready to upload the first program to the board open the arduino ide go to tools boards and select the stm32f4 and three c series go to variant and select 64k flash version go to cpu speed and select 72 megahertz go to upload method and select serial and finally select the comport of your program now go to files examples and scroll down for the stm32 examples digital find the brain sketch and open it the built-in led on this board is connected to pin c-13 so you need to change the PB 1 to PC 13 to get the LED blink on this board after changing this value program is ready to compile and upload but before uploading the program you need to do one more thing before each and every upload you need to switch the first jumper in the microcontroller board as you can see here to the right and press the reset button this way the microcontroller will enters to the programming mode now click upload in the arduino ide and the program should be uploaded after that the program is executed automatically so LED should start to fresh since you are now in the programming mode according to the jumper settings to upload the program again you only need to press the reset button after uploading the program the microcontroller will automatically start to execute the program but this is not the official way to do that if you want to execute the program you need to switch the top jumper back to its original position zero again now if you press reset button the microcontroller will restart the program without going into programming more and that's it we just uploaded our first program to stm32 microcontroller that's all for this video thank you for watching we will be uploading much more videos about stm32 microcontroller programming later if you find this video important to you please like share and subscribe our YouTube channel for more videos like this
Info
Channel: IOTES
Views: 43,233
Rating: undefined out of 5
Keywords: STM32, stm32f103c8t6, STM32duino, Maple mini, Arduino STM32, Getting start with stm32, Arduino IDE, Blue pill, STM32 Blue Pill
Id: fvXTUwt-Ys4
Channel Id: undefined
Length: 9min 38sec (578 seconds)
Published: Tue Feb 20 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.