The STM32F4 BlackPill is a compact and versatile microcontroller development board designed by WeAct Studio. Based on the high-performance STM32F4 series from STMicroelectronics, this board is an excellent choice for embedded applications requiring a balance between processing power, low power consumption, and a rich set of peripherals. Common applications include robotics, custom controllers, hobbyist projects, and educational purposes.
Pin Number | Function | Description |
---|---|---|
1 | VBAT | Battery input for RTC |
2 | PC13 | User button |
3-16 | PA0 - PA15 | GPIO, ADC, various functions |
17-30 | PB0 - PB15 | GPIO, ADC, various functions |
31-37 | PC0 - PC6 | GPIO, ADC, various functions |
38 | 3.3V | 3.3V power supply output |
39 | 5V | 5V power supply input/output |
40 | GND | Ground |
41 | BOOT0 | Boot configuration pin |
42 | VBUS | USB VBUS sensing |
43 | PA13 (SWDIO) | Serial Wire Debug I/O |
44 | PA14 (SWCLK) | Serial Wire Debug Clock |
45 | RESET | Reset input |
To use the STM32F4 BlackPill in a circuit:
Q: Can I power the board using the VIN pin?
A: Yes, you can supply 5V to the VIN pin to power the board.
Q: What is the maximum operating temperature?
A: The STM32F405RG operates within a temperature range of -40°C to 85°C.
Q: How do I reset the board?
A: You can reset the board by momentarily connecting the RESET pin to GND.
Below is an example of how to blink an LED connected to PA5 on the STM32F4 BlackPill using the Arduino IDE:
// Define the LED pin
const int ledPin = PA5;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(ledPin, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Remember to select the correct board and processor from the Arduino IDE's Tools menu before uploading the code.