Table of Contents

SAMD ISP

Based on the ATASAMD11C14, the SAMD ISP is a small programmer board that allows all the microntrollers from the SAMD family to be programmed via Serial Debug Interface, or SWD. SWD is a 2 pin alternative to the JTAG interface, using the same protocol under the hood. SWD is specific to ARM microcontrollers that implement a standard wire bi-directional communication.

In the schematic below, only few additional components are present, apart from the ATASAMD11C14. Notably a 100mA voltage regulator (LM3480IM3-3.3), used to step down from the 5V given by the USB connector, a 1uF capacitor to filter the power noise, and 2 5×2 pin SMD headers.

gitlab.hsrw.eu_ferdinand.meier_fablab_-_wikis_uploads_b0f3e920fd78281bdea7e61000aa682c_schematic.jpg


The board layout uses the ground layer to simplify the connection of the GND signal, and an USB mini connector, to avoid the eventual problems given by the milled USB traces.

gitlab.hsrw.eu_ferdinand.meier_fablab_-_wikis_uploads_4a34e5aeab8afe17e62cb0a6242d6e2c_board_layout.jpg

Programming

Prerequisites

To tryout to program your SAMD ISP, or to setup the environment to work with the SAMD microntrollers, you need to have/install the following software/hardware devices.

Hardware

An important note is, it is always needed to power the devices separately during programming. As power source the USB port is recommended.

Software

ATMEL-ICE

The ATMEL-ICE programmer can be used to program the SAMD chips with the Arduino IDE, Atmel Studio or a command line tool called EDBG. To install the drivers for the ATMEL-ICE it is anyway required to install Atmel Studio 7, even if then Arduino IDE is used then to upload the code. Unfortunately Atmel Studio only runs on Windows (Windows 10 is recommended to have the last version of the studio and of the drivers). To be noted that the drivers to communicate to the SAMD micrcontrollers via USB, will be installed with the Mattairtech ArduinoCore-samd.

To setup the programming via the ATMEL-ICE, follow the steps below:

Once the drivers are installed you can connect the board you want to program. Because of the small picth of the ATMEL-ICE connectors, you may need to use the converter board. The following pictures shows how to connect the ATMEL-ICE to the SAMD ISP. If the green LED is on, then ATMEL-ICE successfully detects the connection with the chip that will be programmed.

ice_ispWhen using the Arduino IDE to upload the bootloader or the code, the following options are selected:

program_arduino_ideTo program using the EDBG command line tool follow the steps below:

SAMD ISP

The SAMD ISP can be used in place of the ATMEL-ICE programmer to upload the code to SAMD microcontrollers. Unfortunately seems that the CMSIS-DAP is not supported by the Arduino IDE as programmer, so the only way to use it (at the moment), is trough the command line tool EDBG.

To program using the EDBG command line tool follow the steps below:

Following is an image about how to connect the SAMD ISP with a fresh one.

SAMD_ISPExample with the SAMD ISP firmware:

edbg -b -t samd11 -pv -f free_dap_d11c_mini.bin

edbg_windowsType edbg -h to have the explanation about the different parameters. Notable ones are the -t target and the -f that indicates the file you want to upload.

edbg_targetsOnce the SAMD ISP firmware has been uploaded, the programmer will be recognized.

SAMD_ISP_detected_2SAMD_ISP_detected_1In case more than one programmer is connected, it is needed to specify the serial number of the programmer that will be used to upload the code. This can be done by using the -s parameter.

programmer_selectionTo upload a code that has been compiled by the Arduino IDE, it is possible to manually copy the compiled bin from the temp folder the IDE is using to store the builds. To find the path is sufficient to enable the verbose output in the Arduino IDE preferences, and then find the path from the compilation logs.

verbose_arduino_idetemp_buildbin

Directly from USB

Depending on which bootloader you have installed into the SAMD ISP, or other SAM microcontrollers, it is possible to directly upload the code by using the USB connection. The recommended one for uploading code via USB is the MattairTech “Generic D11C14A”, found here: Mattairtech ArduinoCore-samd.

MattairBootloaderOnce the proper bootloader is installed, the board will be recognized by the Arduino IDE, and a new serial port will be available.

MattairTech_bootloaderAt this point to upload the code, you just need to push the upload button of the Arduino IDE.

Downloads

SAMD ISP Files
Software

EDBG v. B74:

SAMD ISP firmware:

SAMD11 datasheet
Fab Academy Programmers
EDBG
LM3480IM3-3.3
Arduino IDE
Mattairtech ArduinoCore-samd
Atmel Studio 7
Atmel ICE
Atmel ICE User Guide
Free-DAP