Adafruit Feather M4 Express User manual

Adafruit Feather M4 Express
Created by lady ada
Last updated on 2019-03-04 10:41:14 PM UTC

Overview
It's what you've been waiting for, the Feather M4 Express featuring ATSAMD51. This Feather is fast like a swift, smart
like an owl, strong like a ox-bird (it's half ox, half bird, OK?) This feather is powered by our new favorite chip, the
ATSAMD51J19 - with its 120MHz Cortex M4 with floating point support and 512KB Flash and 192KB RAM. Your code
will zig and zag and zoom, and with a bunch of extra peripherals for support, this will for sure be your favorite new
chipset.
And best of all, it's a Feather - so you know it will work with all our FeatherWings! What a great way to quickly get up
and running.
The most exciting part of the Feather M4 is that while you can use it with the Arduino IDE - and it's bonkers fast when
you do, we are shipping it with CircuitPython on board. When you plug it in, it will show up as a very small disk drive
with main.py on it. Edit main.py with your favorite text editor to build your project using Python, the most popular
programming language. No installs, IDE or compiler needed, so you can use it on any computer, even ChromeBooks or
computers you can't install software on. When you're done, unplug the Feather and your code will go with you.
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 7 of 183

Here are some of the updates you can look forward to when using Feather M4:
Measures 2.0" x 0.9" x 0.28" (51mm x 23mm x 8mm) without headers soldered in
Light as a (large?) feather - 5 grams
ATSAMD51 32-bit Cortex M4 core running at 120 MHz, 32-bit, 3.3V logic and power
Hardware DSP and floating point support
512 KB flash, 192 KB RAM
2 MB SPI FLASH chip for storing files and CircuitPython code storage.
No EEPROM
32.768 KHz crystal for clock generation & RTC
3.3V regulator with 500mA peak current output
USB native support, comes with USB bootloader and serial port debugging
Built in crypto engines with AES (256 bit), true RNG, Pubkey controller
Tons of GPIO! 21 x GPIO pins with following capabilities:
Dual 1 MSPS 12 bit true analog DAC (A0 and A1) - can be used to play 12-bit stereo audio clips
Dual 1 MSPS 12 bit ADC (6 analog pins some on ADC1 and some on ADC2)
6 x hardware SERCOM - Native hardware SPI, I2C and Serial all available
16 x PWM outputs - for servos, LEDs, etc
I2S input and output
8-bit Parallel capture controller (for camera/video in)
Built in 100mA lipoly charger with charging status indicator LED
Pin #13 red LED for general purpose blinking
Power/enable pin
4 mounting holes
Reset button
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 8 of 183

The Feather M4 Express uses the extra space left over to add a Mini NeoPixel, 2 MB SPI Flash storage and a little
prototyping space. You can use the SPI Flash storage like a very tiny hard drive. When used in CircuitPython, the 2 MB
flash acts as storage for all your scripts, libraries and files. When used in Arduino, you can read/write files to it, like a
little datalogger or SD card, and then with our helper program, access the files over USB.
Easy reprogramming: the Feather M4 comes pre-loaded with the UF2 bootloader (https://adafru.it/vQd), which looks
like a USB storage key. Simply drag firmware on to program, no special tools or drivers needed! It can be used to load
up CircuitPython or Arduino IDE (it is bossa-compatible)
Comes fully assembled and tested, with the UF2 USB bootloader. We also toss in some headers so you can solder it in
and plug into a solderless breadboard.
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 9 of 183

© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 10 of 183

Pinouts
The Feather M4 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
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 micro USB 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
Logic pins
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 11 of 183

This is the general purpose I/O pin set for the microcontroller.
All logic is 3.3V
Nearly all pins can do PWM output
All pins can be interrupt inputs
#0 / RX - GPIO #0, also receive (input) pin for Serial1 (hardware UART). Also PWM out
#1 / TX - GPIO #1, also transmit (output) pin for Serial1. Also PWM out
SDA - the I2C (Wire) data pin. There's no pull up on this pin by default so when using with I2C, you may need a
2.2K-10K pullup. Also PWM out
SCL - the I2C (Wire) clock pin. There's no pull up on this pin by default so when using with I2C, you may need a
2.2K-10K pullup. Also PWM out
#4 - GPIO #4, PWM out
#5 - GPIO #5, PWM out
#6 - GPIO #6, PWM out
#9 - GPIO #9, PWM out
#10 - GPIO #10, PWM out
#11 - GPIO #11, PWM out
#12 - GPIO #12, PWM out
#13 - GPIO #13, PWM out and is connected to the red LED next to the USB jack
SCK/MOSI/MISO - These are the hardware SPI pins, you can use them as everyday GPIO pins (but recommend
keeping them free as they are best used for hardware SPI connections for high speed.)
Analog Pins:
A0 - This pin is analog
input
A0 but is also an analog
output
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
A1 - This pin is analog
input
A1 but is also an analog
output
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. Also can do PWM.
A2 thru A5 - These are each analog input as well as digital I/O pins. These pins can also do PWM.
These pins are available in CircuitPython under the board module. Names that start with # are prefixed with D and
other names are as is. So #0 / RX above is available as board.D0 and board.RX for example.
Parallel Capture Peripheral
There's a 'camera' input peripheral you can use with some camera chips to capture video with 8-bit data width. We
thought this was neat so we made sure all those pins were available. Here are the PCC pins (left) and the Feather M4
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 12 of 183

pins it's mapped to. Unlike other peripherals, you cannot mux these signals to other pins!
DEN1: SDA
DEN2: SCL
CLK: D6
D0: D11
D1: D13
D2: D10
D3: D12
D4: MISO
D5: D5
D6: MOSI
D7: SCK
QSPI Flash and NeoPixel
As part of the 'Express' series of boards, the Feather M4 Express is designed for use with CircuitPython. To make that
easy, we have added two extra parts to this Feather M4: a mini NeoPixel (RGB LED) and a 2 MB QSPI (Quad SPI) Flash
chip
The NeoPixel is connected to pin #8 in Arduino, so just use our NeoPixel library (https://adafru.it/dhw) and set it up as a
single-LED strand on pin 8. In CircuitPython, the NeoPixel is board.NEOPIXEL and the library for it is
here (https://adafru.it/wby) and in the bundle (https://adafru.it/uap). 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 also used by the bootloader to
let you know if the device has enumerated correctly (green) or USB failure (red). In CircuitPython, the LED is used to
indicate the runtime status.
The QSPI Flash is connected to 6 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.
QSPI is neat because it allows you to have 4 data in/out lines instead of just SPI's single line in and single line out. This
means that QSPI is
at least
4 times faster. But in reality is at least 10x faster because you can clock the QSPI peripheral
much faster than a plain SPI peripheral
However, the QSPI port is
not
also on an SERCOM. So, you have to either use the QSPI peripheral or bitbang SPI if you
want to talk to the chip. We have an Arduino library here which provides QSPI interfacing for
Arduino (https://adafru.it/BeX). In CircuitPython, the QSPI flash is used natively by the interpretter and is read-only to
user code, instead the Flash just shows up as the writeable disk drive!
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 13 of 183

Other Pins!
RST - this is the Reset pin, tie to ground to manually reset the ATSAMD51, as well as launch the bootloader
manually
ARef - the analog reference pin. Normally the reference voltage is the same as the chip logic voltage (3.3V) but if
you need an alternative analog reference, connect it to this pin and select the external AREF in your firmware.
Can't go higher than 3.3V!
Debugging Interface
If you'd like to do more advanced development, trace-debugging, or not use the bootloader, we have the SWD
interface exposed. You'll have to solder to the two SWD/SWCLK pads on the bottom:
On the Feather M4, at least for now, AREF is tied to 3.3V due to a silicon v0 bug that does not allow the DACs
to work unless AREF is connected to 3.3V. You cut the bottom jumper if you need a different AREF voltage
but note that this may change DAC range!
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 14 of 183

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
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 15 of 183

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
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 16 of 183

We also have 'slim' versions of the female headers, that
are a little shorter and give a more compact shape
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 17 of 183

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
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
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 18 of 183

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
(https://adafru.it/aTk)
).
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 19 of 183

Solder the other strip as well.
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 20 of 183

You're done! Check your solder joints visually and
continue onto the next steps
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
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 21 of 183

Flip & Tack Solder
After flipping over, solder one or two points on each
strip, to 'tack' the header in place
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 22 of 183

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
(https://adafru.it/aTk)
).
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 23 of 183

You're done! Check your solder joints visually and
continue onto the next steps
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 24 of 183

Power Management
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 MicroUSB 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.
The JST connector polarity is matched to Adafruit LiPoly batteries. Using wrong polarity batteries can destroy
your Feather
© Adafruit Industries https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51 Page 25 of 183
Table of contents
Other Adafruit Microcontroller manuals
Popular Microcontroller manuals by other brands

BIG TREE TECH
BIG TREE TECH OCTOPUS user guide

Maxim Integrated
Maxim Integrated DS5000-32-16 user manual

Synaptics
Synaptics AudioSmart manual

Nordic Semiconductor
Nordic Semiconductor nRF52 Preview Development Kit user guide

Freescale Semiconductor
Freescale Semiconductor MC9S08JS16 Series Reference manual

Abov
Abov EW8051 Setup guide