![]() Note that I am using a custom USB to Serial module and your pins might be different to mine in the image above.Īs a test one can then load the Blink sketch from within the Arduino IDE and make sure Generic STM32F103C series is selected under Board, Upload method is Serial and Port is the com port of your USB to Serial module. USB to Serial 3.3V goes to 3.3V Connection of USB to Serial module to UART1 on the chip In our case we are only interested in the boot0 jumper (the one closer to the edge of the PCB), when set to 0 the MCU boots to the normal program memory and when set to 1 to the bootloader.Ĭonnecting things up is fairly straight forward: This is why the board also provides the boot mode jumpers, so one would set the jumpers to select if the chip should boot to the bootloader or directly to the program memory. So by setting some boot pins on the chip one can force the chip to start in the bootloader mode and then upload your program though UART1. The secret here is that the STM32F103 family of devices have a UART bootloader programmed in special ROM memory. Since most people have one of these laying around it’s is a pretty good option to start with. IMPORTANT: Note that this is a 3.3V MCU and you should set your USB to Serial converter to 3.3V or you would most likely kill it. That should take care of the tool-chain, now to the hardware… Selecting the board Using a USB to Serial module After this step restart Arduino IDE (if you had it open during the above steps) and go to Tools->Board and select Generic STM32F103C series. Note that if this folder does not exist you would need to create it. I prefer using Arduino_STM32 and it can be installed by downloading the zip file from here and then extracting it to your. When configuring the IDE one can either use the Board Manager and install STM32 Cores by ST-Microelectronics or use Arduino_STM32. Thanks to some active people in the community we can build and upload our programs using the Arduino IDE. From my limited experience with this chip, one of the best things about it is how many options one have for programming it and how easy it is! I have so far discovered 3 options that worked for me: ![]() So the first thing to do is to figure out how to program this thing. The former seemed to be slightly better built and became more popular and known as the Blue Pill. ![]() It seems that there were initially two variants of the board, one on a blue and one on a red PCB. The pins are broken out in the following way:Īs to why it’s called the Blue Pill, its apparently a reference from the movie The Matrix. So all in all a very straight forward board that reminds me of an Arduino Nano but only a bit bigger and obviously a whole lot faster. Then there are some jumpers to select the boot mode, reset button, LEDs, USB connector and headers to which the pins are broken out to. The board provides the MCU with two crystals, the main one clocked at 8MHz and a second at 32.768kHz which is used for the RTC. ![]() To put that into context we can briefly compare it to two other popular Arduino boards: Feature The board features the STM32F103C8 MCU which is a 32bit ARM Cortex M3 running at 72MHz and provides the programmer with 64kB of flash memory (although mine reported 128kB) and 20kB of RAM. In the end I went the cheap and dirty route and took the Blue Pill which was priced really low and seemed to have an active community behind it. Browsing online stores and Ebay provided a fairly large variety of development boards for the various chips in the STM32 family. The obvious first step into the STM world would be to get a well documented development board and work your way through it. ![]() Obviously there is something up with these chips and I want in on the secret. The speed controllers, radio receiver, radio transmitter and even the flight controller had some variant of these 32bit STM micro-controllers on them. Recently this was the case with some new parts that I bought for my FPV drone and could not help noticing how many of these devices used STM micro-controllers. If you are like me, you often find yourself opening some electronic device to see what makes it tick and maybe discover some new magic part. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |