HSSV ATSAMR21 Breakout English
Welcome to the official page for the ATSAMR21 breakout board by Hackerspace San Salvador!
Para información en español, por favor seguir este vínculo: HSSV_ATSAMR21_Breakout.
This board is designed for use with RIOT OS. (With a little bit of work you could use it with Arduino)
The whole system has the following characteristics:
- 32 bits ARM Cortex M0+ microcontroller
- 2.4GHz low-power transceiver for IEEE 802.15.4 + ZigBee
- 256KB Flash
- Maximum operating frecuency of 48MHz
- Integrated temperature sensor
- 4Mb external Flash memory
- Cryto chip with: Secure key storage, high-speed public-key algorithms, elliptic curves support (NIST P256), SHA-256, unique serial number, high-quality RNG.
- Pre-set MAC address
Design files for this board are available over GitHub.
How to get one of this boards?[editar]
For now we have a very small development batch. If you are interested in collaborate on the development send us an email to with your address. We will include you in the developer list and you'll receive a new development board at a fraction of the cost.
If you are interested to build this board by yourself, please use this resources:
- Order your board at OSHPark
- Get the components on Mouser
- Recommended: Generate the stencils with the eagle design files with OSHStencils
- Load the bootloader with the instructions over HSSV_ATSAMR21_Breakout_English#Flashing_BOSSA_bootloader
Starting the board for the first time[editar]
To start the board for the first time you will need a micro-USB cable. Boards are pre-loaded with the bossa bootloader (Used by Arduino) with the command line tool bossac.
If you assambled the board by yourself. You will also need a JTAG programmer.
On this page you will find instructions for both procedures.
Important notice: At this time is only possible to control RIOT using an external serial port. We hope to have USB-CDC support soon, meanwhile you will need a USB-Serial converter.
To start your board for the first time you'll need the following components:
- Micro-USB Cable
- USB-Serial FTDI converter (or equivalent) with logic levels of 3.3V
- Optional: JTAG Programmer. You can use the ARM-USB-Tiny (remember to buy the adapter board for SWD).
Connect the FTDI convertert to the TX y RX pins as shown in the image:
If your board already includes a bootloader:
- A recent version of [ARM-Cortex GCC Toolchain https://developer.arm.com/open-source/gnu-toolchain/gnu-rm]
- Development tools included with your Linux distribution
- Serial client (I.E.: minicom)
If your board doesn't includes a bootloader:
- A recent version of OpenOCD
Load RIOT-OS with the bootloader[editar]
Connect your board with an USB cable.
Clone the RIOT repository from Hackerspace San Salvador with the following command:
git clone https://github.com/hackerspacesv/RIOT
Change to the examples directory:
Compile the example specifying the breakout board:
Execute the following command to flash the board:
make flash BOARD=hssv-atsamr21-breakout
Open a terminal client with the following command (We assume minicom and the serial device /dev/ttyUSB0):
minicom -b 115200 -D /dev/ttyUSB0
If you press the reset button you'll see a message as the following:
... main(): This is RIOT! (...Versión e info de compilación...) RIOT Network stack example application All up, running the shell now > ...
Flashing BOSSA bootloader[editar]
Bossa is the bootloader used in Arduino boards based on the ATSAMD. We have made a couple of changes to make it available for this development board. If you have assembled your board or if you received one without a bootloader and you cannot load your firmware, use this procedure to flash the bootloader.
Important: To flash the bootloader Bossa you will need a JTAG programmer (We recommend the cheap Olimex ARM-USB-TINY) and a SWD adapter and cable. You can see all the required components on this picture:
Now connect the ATSAMR21 breakout board to an USB port on your computer. After that connect the JTAG programmer as shown in the picture:
Clone our ArduinoCore-samd port:
git clone https://github.com/hackerspacesv/ArduinoCore-samd
Change to the ATSAMR21 Breakout bootloader directory:
With the ARM-USB-TINY connected execute the following command:
openocd -f interface/ftdi/olimex-jtag-tiny.cfg -f interface/ftdi/olimex-arm-jtag-swd.cfg -f target/at91samdXX.cfg
It should show a message like this:
... Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 400 kHz Info : SWD DPIDR 0x0bc11477 Info : at91samd.cpu: hardware has 4 breakpoints, 2 watchpoints Info : Listening on port 3333 for gdb connections
Open a new terminal and execute the following command:
telnet 127.0.0.1 4444
It should show you a message like this:
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Open On-Chip Debugger >
Write the following commands:
reset halt flash write_image erase samr21_sam_ba_HSSV_SAMR21_Mote.bin
You can confirm a successful flash looking for the following message:
auto erase enabled wrote 6400 bytes from file samr21_sam_ba_HSSV_SAMR21_Mote.bin in 0.451532s (13.842 KiB/s)
If you look at /var/log/messages you should see a message like this:
usb 2-1.4: new full-speed USB device number 8 using xhci_hcd usb 2-1.4: New USB device found, idVendor=1209, idProduct=053a, bcdDevice= 2.00 usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-1.4: Product: HSSV SAMR21-Mote usb 2-1.4: Manufacturer: Hackerspace San Salvador cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device
If you are using a systemd based distribution, run the following command:
lsusb | grep InterBiometrics
Verify that the following line appears:
Bus 002 Device 008: ID 1209:053a InterBiometrics