How To Program The STM32 - Blue Pill - With Arduino IDE - Arduino - Maker Pro PDF
How To Program The STM32 - Blue Pill - With Arduino IDE - Arduino - Maker Pro PDF
Home
Explore
Categories
3D Printing
Amateur Radio
Audio
Augmented Reality
Automation
Automotive
Cloud Computing
Computers & Peripherals
Consumer Electronics
Cyber Security
Displays
Drones
Health & Fitness
Home Automation
Industrial
Industrial IoT
IoT
Lighting
Machine Learning
Mobile
Motor Control
Power
Robotics
Security / Identification
Sensors
Smart Grid/Energy
Telecom
Virtual Reality
Wearables
Weather
View All
Platforms
Linux
Raspberry Pi
Arduino
ESP8266
Custom
PIC
PCB
MicroPython
View All
Projects Education Close Menu
Login
Sign Up
Home
Arduino
Tutorials
How to Program the STM32 "Blue Pill" with Arduino IDE
Arduino
Reginald Watson
0
2
12663
Sign Up
Article
Trending
1 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
The STM32F103C8T6 board — also called Blue Pill — is a development board for the ARM Cortex M3 microcontroller. It looks very similar to the Arduino Nano, but it contains a lot more features.
In this article, I will show you how to set up the STM32 with Arduino IDE and show you how to directly program from the USB UART module.
These boards are very cheap compared to the official Arduino board, and the hardware is open source. In addition to the microcontroller, the board can accommodate two crystal oscillators — one 8MHz crystal and one 32KHz crystal — that can be used to drive an internal RTC (real-time clock). As a result,
the MCU can operate in deep sleep mode, making it ideal for battery-powered applications.
To program this board, we need to use a simple USB to UART converter, and then we can program it directly via USB from a computer.
STM32 pinout
Required Materials
STM32 F103C8T6
USB TO UART Converter (FTDI)
Jumper wires
Breadboard
Arduino IDE
2 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
Fritzing diagram
Connect the jumpers as shown below to set the board to DFU mode (device firmware upgrade) and press the Reset button.
3 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
Click on the Additional Board URL option and add this URL after the comma:
http://dan.drown.org/stm32duino/package_STM32duino_index.json
After performing the steps above, you can see the STM32 in the boards list. Now select the STM32F103C.
4 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
Because we are using a UART module for uploading the code, select Upload Method as Serial.
Change the LED pin number with “PC13” as shown in the screenshot below. This is the name of the built-in LED in the board.
//infinite loop
5 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
void loop() {
digitalWrite(PC13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(PC13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
A successful upload!
Conclusion
If the program has been successfully uploaded, you should see the green LED flash at 1-second intervals. You can also use this program to increase or decrease the delay of the LED light.
After uploading the program, you should change the jumpers back to Normal mode so that the next time when you start the board, the uploaded program will automatically start executing.
Reginald Watson
I love challenging myself by creating new projects using different microcontrollers to see what I can come up with.
Author
Comments (2)
stm32flash 0.4
6 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
stm32flash 0.4
Categories
Automation
Cloud Computing
Lighting
Tags
arduino IDE
UART
STM32 F103C8T6
STM32 blue pill
Programming STM32
DIY Inverter
Arduino
March 23, 2020
Utsource Parts
0 0 60
Arduino
March 13, 2020
Utsource Parts
0 0 181
Arduino
March 21, 2020
Silícios Lab
0 0 45
Arduino
March 11, 2020
7 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
rasika Joshi
0 0 196
Arduino
March 19, 2020
rasika Joshi
0 0 56
Arduino
March 10, 2020
Jinani Wijesinghe
0 0 168
Arduino
March 13, 2020
Silícios Lab
0 1 200
Arduino
March 7, 2020
Utsource Parts
1 0 129
We Are
We provide a place for makers like you to share your designs, collaborate with one another, and learn how to take your product to market.
Network sites
Categories
3D Printing
Amateur Radio
Audio
Augmented Reality
Automation
Automotive
Cloud Computing
Computers & Peripherals
Consumer Electronics
Cyber Security
Displays
Drones
Health & Fitness
Home Automation
Industrial
8 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
Industrial IoT
IoT
Lighting
Machine Learning
Mobile
Motor Control
Power
Robotics
Security / Identification
Sensors
Smart Grid/Energy
Telecom
Virtual Reality
Wearables
Weather
View All
Platforms
Linux
Raspberry Pi
Arduino
ESP8266
Custom
PIC
PCB
MicroPython
View All
Connect with Us
Facebook
Twitter
YouTube
Pinterest
About Us
Contact Us
Write for Us
Help Center
Account
Login Sign Up
EETech Media, LLC. All rights reserved
Privacy
Terms of Service
Top
9 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
10 of 11 25-Mar-20, 9:57 AM
How to Program the STM32 "Blue Pill" with Arduino IDE | Arduino | Mak... https://maker.pro/arduino/tutorial/how-to-program-the-stm32-blue-pill-wi...
Continue to site
Quote of the day
“ What we usually consider as impossible are simply engineering problems… there’s no law of physics preventing them. ”
- Michio Kaku
11 of 11 25-Mar-20, 9:57 AM