# Adafruit STM32F405 Feather Express

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/083/559/medium800/feather_boards_4382_iso_ORIG_2019_10.jpg?1572919734)

ST takes flight in this new Feather board. This STM32F405 Feather ([video](https://youtu.be/CZ6TtvYJTeI)) runs CircuitPython at a blistering 168MHz – our fastest CircuitPython board ever! We put a STEMMA QT / Qwiic port on the end, so you can really easily plug and play I2C sensors.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/560/medium800/feather_boards_4382_quarter_ORIG_2019_10.jpg?1572919739)

This Feather has lots of goodies:

- STM32F405 Cortex M4 with 1MB Flash, 168MHz speed
- 3.3V logic, but almost all pins are 5V compliant!
- USB C power and data - our first USB C Feather!
- LiPo connector and charger
- SD socket on the bottom, connected to SDIO port
- 2 MB SPI Flash chip
- Built in NeoPixel indicator
- I2C, UART, GPIO, ADCs, DACs
- Qwiic/STEMMA-QT connector for fast I2C connectivity
- We use the built-in USB DFU bootloader to load firmware. It does _not_ come with a UF2 bootloader.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/562/medium800/feather_boards_4415_top_demo_ORIG_2019_11.jpg?1572919794)

With CircuitPython basics running on this board, it's fast to get all our drivers working, then use the built in plotter in Mu to instantly get sensor data displaying within 3 minutes of unboxing.

**You can use MicroPython, CircuitPython or Arduino IDE with this board, with some caveats.**

- CircuitPython support is under development. F4 family boards like this one are considered stable, and support common modules like digital IO, analog IO, I2C, SPI, PWM, and displays. Some less-used modules may be missing compared to the SAMD-type Feathers - you can check the exact list of supported modules on our documentation's [Support Matrix](https://circuitpython.readthedocs.io/en/latest/shared-bindings/support_matrix.html).
- [Arduino is supported through STM32duino](https://github.com/stm32duino). There's [no auto-reset bootloader support yet](https://github.com/stm32duino/Arduino_Core_STM32/issues/706) so you have to pull the BOOT0 pin high and manually reset before uploading. That said, STM32 support is really good, and we were able to run just about every sketch we tried.
- MicroPython support is very solid but Adafruit does not provide MicroPython libraries for sensors!

We tested this in Arduino STM32duino with all our FeatherWings and only the RFM69/RFM9x libraries did not work (they are very platform specific). It's an extraordinarily fast Feather, and our first foray into STM32 - very exciting!

![](https://cdn-learn.adafruit.com/assets/assets/000/083/561/medium800/feather_boards_4382_top_ORIG_2019_10.jpg?1572919750)

# Adafruit STM32F405 Feather Express

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/083/563/medium800/feather_boards_pintous.jpg?1572921997)

The Feather STM32F405 is chock-full of microcontroller goodness. There's also a lot of pins and ports. We'll take you a tour of them now!

# Power Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/083/564/medium800/feather_boards_power.jpg?1572922068)

- **GND** - this is the common ground for all power and logic
- **BAT** - this is the positive voltage to/from the JST jack for the optional Lipoly battery
- **USB** - this is the positive voltage to/from the USB C jack if connected
- **EN** - this is the 3.3V regulator's enable pin. It's pulled up, so connect to ground to disable the 3.3V regulator
- **3V** - this is the output from the 3.3V regulator, it can supply 500mA peak

![](https://cdn-learn.adafruit.com/assets/assets/000/083/565/medium800/feather_boards_logic.jpg?1572922119)

This is the general purpose I/O pin set for the microcontroller.   
**All logic is 3.3V, nearly all pins are 5V compliant**  
**Many pins can do PWM output**  
**All pins can be interrupt inputs**

- **RX** / **GPIO 0** &nbsp; / **PB11**  
Receive (input) pin for **Serial3**. Hardware USART3  
PWM out on **TIM2\_CH4**  
Alternate uses: I2C2 SDA
- **TX** / **GPIO 1** / **PB10**  
Transmit (output) pin for **Serial3**. Hardware USART3  
PWM out on **TIM2\_CH3**  
Alternate uses: I2C2 SCL
- **SDA** / **GPIO 14** / **PB7**  
The I2C (Wire) data pin, this has a 10K pullup to 3.3V. Hardware I2C1  
PWM out on **TIM4\_CH2**  
Alternate uses: USART1 RX  
- **SCL&nbsp;** / **GPIO**  **15** /&nbsp; **PB6**  
the I2C (Wire) clock pin, this has a 10K pullup to 3.3V. Hardware I2C1  
 PWM out on **TIM4\_CH1**  
Alternate uses: USART1 TX, CAN2 TX  
- **GPIO 5** / **PC7**  
PWM out on **TIM3\_CH2**  
Alternate uses: USART6 RX, I2S3 MCK
- **GPIO 6** / **PC6**  
PWM out on **TIM3\_CH1**  
Alternate uses: USART6 TX, I2S2 MCK
- **GPIO 9** / **PB8**  
PWM out on **TIM4\_CH3**  
Alternate uses: CAN1 RX, I2C1 SCL
- **GPIO 10** / **PB9**  
PWM out on **TIM4\_CH4**  
Alternate uses: CAN1 TX, I2C1 SDA
- **GPIO 11** / **PC3**  
No PWM  
Alternate uses: I2S2 SD, SPI2 MOSI
- **GPIO 12** / **PC2**  
No PWM  
Alternate uses: I2S2ext SD, SPI2 MISO  
- **GPIO 13** / **PC1**  
Connected to the **red LED** next to the USB jack  
No PWM or alternate uses
- **SCK** / **GPIO23** / **PB13**  
The SPI bus clock pin. Hardware SPI2  
PWM out on **TIM1\_CH1N** (available in Arduino, not CircuitPython)  
Alternate uses: I2S2 Clock, CAN2 TX
- **MISO** / **GPIO24** / **PB14**  
The SPI bus input data pin. Hardware SPI2  
PWM out on **TIM1\_CH2N**   
Alternate uses: I2S2ext SD
- **MOSI** / **GPIO25** / **PB15**  
The SPI bus output data pin. Hardware SPI2  
PWM out on **TIM1\_CH3N**   
Alternate uses: I2S2 SD

Analog Pins:

- **A0&nbsp;** / **GPIO 16** / **PA4**   
This pin is analog _input_ **A0** &nbsp;( **ADC12 IN4** )  
Analog _output_ ( **DAC OUT1** ) due to having a DAC (digital-to-analog converter). You can set the raw voltage to anything from 0 to 3.3V, unlike PWM outputs this is a true analog output  
No PWM or alternate uses
- **A1** / **GPIO 17** / **PA5**  
This pin is analog _input&nbsp;_ **A1** ( **ADC12 IN5** )   
Analog _output_ ( **DAC OUT2** ) due to having a DAC (digital-to-analog converter). This is the second DAC, and is 'independent' of A0. You can set the raw voltage to anything from 0 to 3.3V, unlike PWM outputs this is a true analog output.   
Alternative uses: SPI1 SCK
- **A2** / **GPIO18** / **PA6**  
This pin is analog _input&nbsp;_ **A2** ( **ADC12 IN6** )  
Alternative uses: SPI1 MISO  
PWM out on **TIM3\_CH1**
- **A3** / **GPIO19** / **PA7**  
This pin is analog _input&nbsp;_ **A3** ( **ADC12 IN7** )  
Alternative uses: SPI1 MOSI  
PWM out on **TIM3\_CH2**
- **A4** / **GPIO20** / **PC4**  
This pin is analog _input&nbsp;_ **A4** ( **ADC12 IN14** )
- **A5** / **GPIO21** / **PC5**  
This pin is analog _input&nbsp;_ **A5** ( **ADC12 IN15** )

**A6** is also available for reading the battery voltage, see the Power Management page for instructions how

## I2S Pins:

- **#1/Tx** - I2S2 `bit_clock` pin.
- **#6** - I2S2 `master clock` pin
- **#10** - I2S2 `word_select` pin.
- **#11** - I2S2 `data` pin.

Note at this time we have not tested I2S in Arduino or MicroPython. There is no support yet in CircuitPython.

## CAN Pins:

- **#9** - CAN1 RX
- **#10** - CAN1 TX

CircuitPython has CAN support via the `canio` module. MicroPython also supports CAN. [Arduino has an open issue](https://github.com/stm32duino/Arduino_Core_STM32/issues/259), no support.

# SD Card / SDIO Pins
![](https://cdn-learn.adafruit.com/assets/assets/000/083/567/medium800/feather_boards_bottom.jpg?1572929407)

On the bottom of the PCB is a micro SD card slot. Unlike other Feathers, this is connected to the SDIO port ( **PC8** thru **PC12** plus **PD2** ).

In Arduino, [SDIO is well supported via the **STM32SD** library](https://github.com/stm32duino/STM32SD)&nbsp;.CircuitPython and MicroPython support SDIO. In CircuitPython use the `sdioio` module.

The SD detect pin is on **PB12** a.k.a **D32.   
[Rev B of this PCB has an error where SD detect is not usable, we will fix in rev C!](https://github.com/adafruit/Adafruit-Feather-STM32F405-Express-PCB/issues/1)**

# BAT Pins

The bottom has a test point named BAT near the center of the board. You can use it to keep the STM32's real-time clock, backup registers, and backup SRAM running while the rest of the chip is powered down.

Danger: 

# SWD Port

On the bottom there is also a 2x5 connector pad that can be used to connect an SWD debug port for advanced uses. We don't solder the connector in place because it would take up space and make it hard to insert into a breadboard. However, [you can pick up a 2x5 connector](https://www.adafruit.com/?q=swd%20connector) and solder it yourself! Pinout matches any/all JLink/SWD programmers with 2x5 connectors.

# SPI Flash, STEMMA and NeoPixel

As part of the 'Express' series of boards, the Feather STM32F405 Express is designed for use with CircuitPython. To make that easy, we have added two extra parts to this Feather: a mini NeoPixel (RGB LED) and a 2 MB SPI Flash chip.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/568/medium800/feather_boards_others.jpg?1572929975)

The **NeoPixel** is connected to pin #8 in Arduino, so [just use our NeoPixel library](https://learn.adafruit.com/adafruit-neopixel-uberguide) and set it up as a single-LED strand on pin 8.

CircuitPython, the NeoPixel is `board.NEOPIXEL` and the library for it is [here](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/releases) and in [the bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases). The NeoPixel is powered by the 3.3V power supply but that hasn't shown to make a big difference in brightness or color. The NeoPixel is _not used by the built in STM32 bootloader!_ This is different than our M0/M4/nRF52840 boards

The **SPI Flash** is connected to SPI bus 1 pins that are not brought out on the GPIO pads. This way you don't have to worry about the SPI flash colliding with other devices on the main SPI connection.

We give the SPI Flash the 'faster' SPI port 1 because there is no QSPI support, and reading fast from the SPI is important if you want to stream audio clips or GIFs.

In CircuitPython the SPI flash is automatically used as the filesystem exposed over USB.

In Arduino you can access [SPI flash with our library](https://github.com/adafruit/Adafruit_SPIFlash) and adding this definition to the top of your sketch to instantiate the SPI flash.   
`SPIClass SPI_FLASH(PIN_SPI1_MOSI, PIN_SPI1_MISO, PIN_SPI1_SCK, PIN_SPI1_SS);`  
`Adafruit_FlashTransport_SPI flashTransport(PIN_SPI1_SS, &SPI_FLASH);`  
Note that our SPI flash library cannot be used at the same time as the SDIO library because they have colliding File definitions.

The **Qwiic / STEMMA QT port** is a JST SH 1.0mm pitch connector that gives a plug-and-play connection to 3.3V, GND, SDA and SCL. Perfect for attaching a wide variety of sensors. [Check out our wide range of cables and devices that can be chained together just like this mini GPS module:](https://www.adafruit.com/?q=stemma%20qt&main_page=category&cPath=1005)

In CircuitPython, you can use the STEMMA connector with&nbsp;`board.SCL`&nbsp;and&nbsp;`board.SDA`, or&nbsp;`board.STEMMA_I2C()`.

![](https://cdn-learn.adafruit.com/assets/assets/000/083/580/medium800/feather_boards_4415_top_demo_ORIG_2019_11.jpg?1572930518)

# Adafruit STM32F405 Feather Express

## Assembly

We ship Feathers fully tested but without headers attached - this gives you the most flexibility on choosing how to use and configure your Feather

# Header Options!

Before you go gung-ho on soldering, there's a few options to consider!

The first option is soldering in plain male headers, this lets you plug in the Feather into a solderless breadboard

![feather_3010-05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/192/medium640/feather_3010-05.jpg?1454100293)

![feather_3010-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/201/medium640/feather_3010-01.jpg?1454100690)

Another option is to go with socket female headers. This won't let you plug the Feather into a breadboard but it will let you attach featherwings very easily

A few Feather boards require access to top-side components like buttons or connectors, making stacking impractical. Sometimes you can stack in the opposite order—FeatherWing underneath—or, if _both_ Feather and Wing require top-side access,&nbsp;place the boards side-by-side with a [FeatherWing Doubler](https://www.adafruit.com/product/2890) or [Tripler](https://www.adafruit.com/product/3417).

![feather_2886-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/195/medium640/feather_2886-01.jpg?1454100431)

![feather_2886-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/196/medium640/feather_2886-02.jpg?1454100477)

![adafruit_products_2890-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/117/300/medium640/adafruit_products_2890-02.jpg?1672855047)

We also&nbsp; have 'slim' versions of the female headers, that are a little shorter and give a more compact shape

![feather_2940-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/197/medium640/feather_2940-01.jpg?1454100533)

![feather_2940-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/198/medium640/feather_2940-04.jpg?1454100544)

Finally, there's the "Stacking Header" option. This one is sort of the best-of-both-worlds. You get the ability to plug into a solderless breadboard _and_ plug a featherwing on top. But its a little bulky

![feather_2830-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/199/medium640/feather_2830-01.jpg?1454100588)

![feather_2830-00.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/200/medium640/feather_2830-00.jpg?1454100660)

# Soldering in Plain Headers
## Prepare the header strip:

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - **long pins down**

![feather_headers.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/183/medium640/feather_headers.jpg?1454099573)

## Add the breakout board:

Place the breakout board over the pins so that the short pins poke through the breakout pads

## And Solder!

Be sure to solder all pins for reliable electrical contact.  
  
_(For tips on soldering, be sure to check out our_ [_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![feather_solder1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/184/medium640/feather_solder1.jpg?1454099592)

![feather_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/185/medium640/feather_solder2.jpg?1454099649)

![feather_solder3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/186/medium640/feather_solder3.jpg?1454099655)

Solder the other strip as well.

![feather_solder4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/187/medium640/feather_solder4.jpg?1454099662)

![feather_solder5.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/188/medium640/feather_solder5.jpg?1454099665)

![feather_solder6.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/189/medium640/feather_solder6.jpg?1454099667)

You're done! Check your solder joints visually and continue onto the next steps

![feather_done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/190/medium640/feather_done.jpg?1454099807)

# Soldering on Female Header
## Tape In Place

For sockets you'll want to tape them in place so when you flip over the board they don't fall out

![feather_taped.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/203/medium640/feather_taped.jpg?1454101091)

## Flip & Tack Solder

After flipping over, solder one or two points on each strip, to 'tack' the header in place

![feather_tack1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/204/medium640/feather_tack1.jpg?1454101126)

![feather_tack2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/205/medium640/feather_tack2.jpg?1454101143)

![feather_tack3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/206/medium640/feather_tack3.jpg?1454101147)

## And Solder!

Be sure to solder all pins for reliable electrical contact.  
  
_(For tips on soldering, be sure to check out our_ [_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![feather_soldre1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/207/medium640/feather_soldre1.jpg?1454101162)

![feather_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/208/medium640/feather_solder2.jpg?1454101165)

![feather_solder3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/209/medium640/feather_solder3.jpg?1454101168)

You're done! Check your solder joints visually and continue onto the next steps

![feather_soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/210/medium640/feather_soldered.jpg?1454101174)

![feather_done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/211/medium640/feather_done.jpg?1454101177)

# Adafruit STM32F405 Feather Express

## Power Management

![](https://cdn-learn.adafruit.com/assets/assets/000/066/656/medium800/arduino_compatibles_adafruit_products_2772_iso_demo_ORIG.jpg?1543595631)

# Battery + USB Power

We wanted to make the Feather easy to power both when connected to a computer as well as via battery. There's **two ways to power** a Feather. You can connect with a USB C cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V. You can also connect a 4.2/3.7V Lithium Polymer (Lipo/Lipoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargable battery. **When the USB power is powered, it will automatically switch over to USB for power, as well as start charging the battery (if attached) at 100mA.** This happens 'hotswap' style so you can always keep the Lipoly connected as a 'backup' power that will only get used when USB power is lost.

Danger: 

The below image shows the USB C jack (left), Lipoly JST jack (above and to the right of the USB), as well as the changeover diode (just below JST jack) and the Lipoly charging circuitry (to the right of the JST jack). There's also a **CHG** LED, which will light up while the battery is charging. This LED might also flicker if the battery is not connected.

![](https://cdn-learn.adafruit.com/assets/assets/000/095/438/medium800/adafruit_products_feather_boards_charging.jpg?1602090791)

# Power supplies

You have a lot of power supply options here! We bring out the **BAT** pin, which is tied to the lipoly JST connector, as well as **USB** which is the +5V from USB if connected. We also have the **3V** pin which has the output from the 3.3V regulator. We use a 500mA peak regulator. While you can get 500mA from it, you can't do it continuously from 5V as it will overheat the regulator. It's fine for, say, powering an ESP8266 WiFi chip or XBee radio though, since the current draw is 'spikey' & sporadic.

**Note the STM32F405 is a fairly power hungry chip, it will draw up to 80mA when it runs**

![](https://cdn-learn.adafruit.com/assets/assets/000/083/595/medium800/feather_boards_power.jpg?1572976691)

# Measuring Battery

If you're running off of a battery, chances are you wanna know what the voltage is at! That way you can tell when the battery needs recharging. Lipoly batteries are 'maxed out' at 4.2V and stick around 3.7V for much of the battery life, then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly tell when you're heading below 3.7V

To make this easy we stuck a double-100K resistor divider on the **BAT** pin, and connected it to **A6** which is not exposed on the feather breakout

In Arduino, you can read this pin's voltage, then double it, to get the battery voltage.

```
// Arduino Example Code snippet

#define VBATPIN A6

float measuredvbat = analogRead(VBATPIN);
measuredvbat *= 2;    // we divided by 2, so multiply back
measuredvbat *= 3.3;  // Multiply by 3.3V, our reference voltage
measuredvbat /= 1024; // convert to voltage
Serial.print("VBat: " ); Serial.println(measuredvbat);
```

For CircuitPython, we've written a `get_voltage()` helper function to do the math for you. All you have to do is call the function, provide the pin and print the results.

```
import board
from analogio import AnalogIn

vbat_voltage = AnalogIn(board.VOLTAGE_MONITOR)


def get_voltage(pin):
    return (pin.value * 3.3) / 65536 * 2


battery_voltage = get_voltage(vbat_voltage)
print("VBat voltage: {:.2f}".format(battery_voltage))
```

# ENable pin

If you'd like to turn off the 3.3V regulator, you can do that with the **EN** (able) pin. Simply tie this pin to **Ground** and it will disable the 3V regulator. The **BAT** and **USB** pins will still be powered

![](https://cdn-learn.adafruit.com/assets/assets/000/083/596/medium800/feather_boards_en.jpg?1572976808)

# Alternative Power Options

The two primary ways for powering a feather are a 3.7/4.2V LiPo battery plugged into the JST port _or_ a USB power cable.

If you need other ways to power the Feather, here's what we recommend:

- For permanent installations, a [5V 1A USB wall adapter](https://www.adafruit.com/product/501) will let you plug in a USB cable for reliable power
- For mobile use, where you don't want a LiPoly, [use a USB battery pack!](https://www.adafruit.com/product/1959)
- If you have a higher voltage power supply, [use a 5V buck converter](https://www.adafruit.com/?q=5V%20buck) and wire it to a [USB cable's 5V and GND input](https://www.adafruit.com/product/3972)

Here's what you cannot do:

- **Do not use alkaline or NiMH batteries** and connect to the battery port - this will destroy the LiPoly charger and there's no way to disable the charger
- **Do not use 7.4V RC batteries on the battery port** - this will destroy the board

The Feather _is not designed for external power supplies_ - this is a design decision to make the board compact and low cost. It is not recommended, but technically possible:

- **Connect an external 3.3V power supply to the 3V and GND pins.** Not recommended, this may cause unexpected behavior and the **EN** pin will no longer enable/work. Also this doesn't provide power on **BAT** or **USB** and some Feathers/Wings use those pins for high current usages. You may end up damaging your Feather.
- **Connect an external 5V power supply to the USB and GND pins.** Not recommended, this may cause unexpected behavior when plugging in the USB port because you will be back-powering the USB port, which _could_ confuse or damage your computer.

# Adafruit STM32F405 Feather Express

## Arduino IDE Setup

The first thing you will need to do is to download the latest release of the Arduino IDE. You will need to&nbsp;be using **version 1.8** or higher for this guide

[Arduino IDE Download](http://www.arduino.cc/en/Main/Software)
Thankfully the Adafruit board support is now supported directly from STM32duino so you can simply install it:

From the **File** menu select **Preferences**

![adafruit_products_image.png](https://cdn-learn.adafruit.com/assets/assets/000/086/489/medium640/adafruit_products_image.png?1577300559)

Find the **Additional Board Manager URLs** text box.

If it's empty add the text

`https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json`

or, if its not empty, add a **comma** at the end of the current text, and then add the line above

![adafruit_products_image.png](https://cdn-learn.adafruit.com/assets/assets/000/086/490/medium640/adafruit_products_image.png?1577300648)

From the **Tools** menu, go down to **Board** submenu and select **Board Manager...**

![adafruit_products_image.png](https://cdn-learn.adafruit.com/assets/assets/000/086/491/medium640/adafruit_products_image.png?1577300750)

Search for **STM32** and click **Install** - make sure you have the latest version, _at least 1.8.0_ selected and installed!

![adafruit_products_image.png](https://cdn-learn.adafruit.com/assets/assets/000/086/493/medium640/adafruit_products_image.png?1577300877)

 **Quit and restart the Arduino IDE**

From the **Tools** menu, select **Generic STM32F4**

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/663/medium640/feather_boards_image.png?1573005158)

Then select **Board part number** -\> **Adafruit Feather STM32F405**

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/664/medium640/feather_boards_image.png?1573005205)

Under **USB Support** select **CDC**  **supercedes USART** so that **Serial** points to the USB port not the hardware serial

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/665/medium640/feather_boards_image.png?1573005266)

Finally select **STM32CubeProgrammer (DFU)** as the upload method

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/666/medium640/feather_boards_image.png?1573006115)

These are your **Tool** menu selections to verify!

![](https://cdn-learn.adafruit.com/assets/assets/000/083/668/medium800/feather_boards_image.png?1573006210)

Warning: 

# Activate the Bootloader

At this time, you must manually put the board into bootloader mode every time you want to upload.

Do that by connecting the **B0** pin to 3.3V and clicking reset

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/669/medium640/feather_boards_image.png?1573006270)

Info: 

[There's work in progress to have STM32 auto-reload, hopefully that will make it into a release soon!](https://github.com/stm32duino/Arduino_Core_STM32/issues/706)

# Upload!

Once you are bootloader mode, click **Upload** to compile and upload your sketch

![](https://cdn-learn.adafruit.com/assets/assets/000/083/670/medium800/feather_boards_image.png?1573006690)

# STM32duino Notes

- Hardware Serial UART is on **Serial3** not **Serial1** as is usually called
- Yes NeoPixel library has support for STM32F4!
- [The SDIO SD card is supported by this library](https://github.com/stm32duino/STM32SD)

![](https://cdn-learn.adafruit.com/assets/assets/000/086/493/medium800/adafruit_products_image.png?1577300877)

# Adafruit STM32F405 Feather Express

## MicroPython Setup

We don't really support MicroPython explictly at Adafruit - our drivers are for CircuitPython. However, for people who like MicroPython, [we submitted a build definition](https://github.com/micropython/micropython/tree/master/ports/stm32/boards/ADAFRUIT_F405_EXPRESS)!

You can build the latest version from the github or load this MicroPython 1.9.4 build we crafted for you.

Load it by following the [**DFU Bootloader**](https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details) tutorial in this guide.&nbsp; Follow the instructions for when you have a **.dfu** file.

[micropython_1.9.4_Feather_STM32F405.zip](https://cdn-learn.adafruit.com/assets/assets/000/083/671/original/micropython_1.9.4_Feather_STM32F405.zip?1573009976)
Upon success, reset the board without the **BOOT0** jumper and you will see after a few seconds the **PYBFLASH** disk drive appear

![](https://cdn-learn.adafruit.com/assets/assets/000/083/677/medium800/feather_boards_image.png?1573011983)

That's it! [You can now follow along MicroPython documentation and tutorials to learn more about how to use MicroPython](https://docs.micropython.org/en/latest/pyboard/tutorial/index.html).

# MicroPython Notes

The Feather uses the same chip as the PyBoard 1.1 so technically anything available on the PyBoard should work on the Feather, given the pin differences

We use **Dx** and **Ax** pin names, to match the Feather markings. [You can see the pin names here](https://github.com/micropython/micropython/blob/master/ports/stm32/boards/ADAFRUIT_F405_EXPRESS/pins.csv)

[The SD card slot can be used for file and code storage](https://docs.micropython.org/en/latest/pyboard/general.html#local-filesystem-and-sd-card)

SPI flash is not used by MicroPython (it's something specific to CircuitPython)

# Adafruit STM32F405 Feather Express

## CircuitPython Setup

To load CircuitPython, follow the **DFU Bootloader** instructions to get the board into bootloader mode

Visit [https://circuitpython.org/board/feather\_stm32f405\_express/](https://circuitpython.org/board/feather_stm32f405_express/) To get the latest firmware available

![](https://cdn-learn.adafruit.com/assets/assets/000/083/674/medium800/feather_boards_image.png?1573011908)

Download the **bin** file, and then program it using [**dfu-util** or **STM32CubeProgrammer**](https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details)

Upon success, reset the board without the **BOOT0** jumper and you will see after a few seconds the **CIRCUITPY** disk drive appear

![](https://cdn-learn.adafruit.com/assets/assets/000/083/679/medium800/feather_boards_image.png?1573012173)

Next you can visit [https://learn.adafruit.com/welcome-to-circuitpython](https://learn.adafruit.com/welcome-to-circuitpython)and [https://learn.adafruit.com/circuitpython-essentials/](https://learn.adafruit.com/circuitpython-essentials/) to learn more about CircuitPython

# CircuitPython Notes

If you are intending to start a project that is very RAM intensive, note you cannot access the full 196KB of RAM that listed on the F405 datasheet and website - only 128KB is available to Circuitpython programs for system reasons. You'll find the same limitation on Micropython and most other F405 devices.

STM32F4 support is new compared to the SAMD and nRF boards, but is now considered stable. Working modules on this board include:

- Digital IO (LEDs/buttons)
- analog input
- analog output (DAC)
- PWM output on timer pins
- I2C
- SPI
- [NeoPixel Support](https://github.com/adafruit/circuitpython/issues/2264)
- [UART Support](https://github.com/adafruit/circuitpython/pull/2211)
- DisplayIO
- PulseIO

To come:

- I2S
- Audio
- TouchIO
- many others!

[If you find something missing or flawed, please open an issue in circuitpython](https://github.com/adafruit/circuitpython/issues?q=is%3Aissue+is%3Aopen+label%3Astm)

# Adafruit STM32F405 Feather Express

## DFU Bootloader Details

Warning: 

The STM32F405 chip has a built in ROM bootloader that cannot be disabled or erased, this makes it a fool-proof way to always be able to recover your microcontroller code. It's not as easy to use as UF2, but it isnt _too difficult_ either.

The ROM bootloader looks for signal on the serial **RX** line as well as USB, so make sure no GPS or other serial/uart data device is connected to **RX** while you are trying to bootload the device!

# Enabling DFU bootloader mode

Enabling the DFU bootloader is super easy. Simply connect the **BOOT0** ( **B0** ) pin to 3.3V logic. Then press the reset button or power cycle while the board is connected to your computer USB port

![](https://cdn-learn.adafruit.com/assets/assets/000/083/645/medium800/feather_boards_image.png?1572999908)

After you've hit reset, you can remove the BOOT0 jumper - it's only checked on powerup

# Check for USB Bootloader device
In **Windows** , you will see the device show up as **STM32 BOOTLOADER** under Universal Serial Bus devices

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/646/medium640/feather_boards_image.png?1573000023)

In&nbsp; **MacOS X**

Visit the **AppleMenu-\>About This Mac-\>System Report**

Select **USB** and look for the item labeled **STM32 BOOTLOADER**

![feather_boards_screenshot_10.png](https://cdn-learn.adafruit.com/assets/assets/000/083/658/medium640/feather_boards_screenshot_10.png?1573002844)

# Programming Firmware
## Windows

The easiest way by far to program under windows is to download STM32CubeProg. It's a graphical programmer, does not require Zadig or special command line invocation

You'll need to make an ST.com account is the only downside.

[Download STM32CubeProg](https://www.st.com/en/development-tools/stm32cubeprog.html)
Warning: With a new version of this software out, users report some of the buttons and prompts may be different than those shown. As this is an advanced section, the user should look to map the appropriate responses.

When you start it up, it'll look like this.

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/648/medium640/feather_boards_image.png?1573000272)

In the top right, below the Not Connected message, find the dropdown to the left of the Connect button

Select **USB**

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/649/medium640/feather_boards_image.png?1573000315)

OK if the device is plugged in and the bootloader is running, it will show up under the USB configuration pane. If not, enter bootloader mode by connecting BOOT0 to 3.3V and resetting, and click the refresh button.

Once it appears as a valid Port, click **Connect**

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/650/medium640/feather_boards_image.png?1573000385)

You should see the Device info pane in the bottom right is updated with info about what chip was found!

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/651/medium640/feather_boards_image.png?1573000490)

Click the 3-lines below the STM32 logo in the top left, to expand the menu.

Then click **Erasing & Programming**

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/652/medium640/feather_boards_image.png?1573000550)

Click **Browse** to open the firmware files you want to program

You can program **.hex** or **.bin** files, it does not seem to support **.dfu**

Don't change the **Start Address**

Make sure **Verify**  **Programming** and **Run after Programming** are clicked, but **Skip flash erase** is _not_

Then click **Start Programming**

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/654/medium640/feather_boards_image.png?1573000660)

It will take a few seconds to erase and reprogram the chip.

It's normal to get a **Warning Connection is**  **lost** alert

Click away until you get the **File download complete** alert

That's it! You should close STM32 CubeProg now - leaving the program open may conflict with other connections to the board.

![feather_boards_image.png](https://cdn-learn.adafruit.com/assets/assets/000/083/655/medium640/feather_boards_image.png?1573000771)

![feather_boards_connectfail.png](https://cdn-learn.adafruit.com/assets/assets/000/083/656/medium640/feather_boards_connectfail.png?1573000845)

![feather_boards_complete.png](https://cdn-learn.adafruit.com/assets/assets/000/083/657/medium640/feather_boards_complete.png?1573000858)

## Mac (and Linux)

For Mac users, install `dfu-util` with `brew`

**dfu-util** can only program .bin and .dfu files. It cannot program .hex files (but there are tools to convert .hex's to .bin's)

![](https://cdn-learn.adafruit.com/assets/assets/000/083/659/medium800/feather_boards_screenshot_11.png?1573003475)

Then upload the firmware with the command

`dfu-util -a 0 --dfuse-address 0x08000000 -D firmware.bin`

Don't change the address value, only the firmware filename!

![](https://cdn-learn.adafruit.com/assets/assets/000/083/660/medium800/feather_boards_screenshot_13.png?1573003496)

Or, if you have a **dfu** file - use

`dfu-util -a 0 -D firmware.dfu`

![](https://cdn-learn.adafruit.com/assets/assets/000/083/672/medium800/feather_boards_screenshot_14.png?1573011457)

Upon success, reset the board without the **BOOT0** jumper and you will see after a few seconds the **CIRCUITPY** disk drive appear

# Adafruit STM32F405 Feather Express

## Downloads

# Files

- [ST STM32F405 Product Page](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) - datasheets and app notes are found here
- [Fritzing object in Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-Feather-STM32F405-Express-PCB)

# Schematic & Fabrication Print
![](https://cdn-learn.adafruit.com/assets/assets/000/083/680/medium800/feather_boards_schem.png?1573012880)

![](https://cdn-learn.adafruit.com/assets/assets/000/083/681/medium800/feather_boards_fabprint.png?1573012977)


## Primary Products

### Adafruit Feather STM32F405 Express

[Adafruit Feather STM32F405 Express](https://www.adafruit.com/product/4382)
ST takes flight in this Feather board. The new STM32F405 Feather ([video](https://youtu.be/CZ6TtvYJTeI)) that we designed runs CircuitPython at a blistering 168MHz – our fastest CircuitPython board ever! We put a STEMMA QT / Qwiic port on the end, so you can really easily plug...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4382)
[Related Guides to the Product](https://learn.adafruit.com/products/4382/guides)

## Related Guides

- [Blinking an LED with the Zephyr RTOS](https://learn.adafruit.com/blinking-led-with-zephyr-rtos.md)
- [CircuitPython Powered Sip & Puff with ST LPS33HW Pressure Sensor](https://learn.adafruit.com/st-lps33-and-circuitpython-sip-and-puff.md)
- [CAN Bus with CircuitPython: Using the canio module](https://learn.adafruit.com/using-canio-circuitpython.md)
- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [Adafruit SCD-40 and SCD-41](https://learn.adafruit.com/adafruit-scd-40-and-scd-41.md)
- [CircusPython: Jump through Hoops with CircuitPython Bluetooth LE](https://learn.adafruit.com/circuspython-jump-through-hoops-with-bluetooth-le.md)
- [Adafruit MCP23017 I2C GPIO Expander](https://learn.adafruit.com/adafruit-mcp23017-i2c-gpio-expander.md)
- [Adafruit AM2320 Sensor](https://learn.adafruit.com/adafruit-am2320-temperature-humidity-i2c-sensor.md)
- [CircuitPython Minesweeper Game](https://learn.adafruit.com/circuitpython-pyportal-minesweeper-game.md)
- [PyRuler Video Conference Panic Buttons](https://learn.adafruit.com/pyrulervideopanic.md)
- [Personal and Portable ESP32-S2 Web Server](https://learn.adafruit.com/wordle-personal-esp32-s2-web-server.md)
- [Adafruit Proximity Trinkey](https://learn.adafruit.com/adafruit-proximity-trinkey.md)
- [Adafruit STEMMA Audio Amp](https://learn.adafruit.com/stemma-audio-amp.md)
- [LSM6DSOX, ISM330DHC, & LSM6DSO32 6 DoF IMUs](https://learn.adafruit.com/lsm6dsox-and-ism330dhc-6-dof-imu.md)
- [TMP006 Infrared Sensor Breakout](https://learn.adafruit.com/infrared-thermopile-sensor-breakout.md)
