Skip to content

Seeed Xiao as DAPLink to burn bootloader the SAMD11 boards

ref .How to use Arduino Boards as DAPLink Device

  • Seeed_Arduino_DAPLink -> Code -> Download ZIP -> Seeed_Arduino_DAPLink-master .zip

  • Open the Arduino IDE, and click sketch -> Include Library -> Add .ZIP Library, and choose Downloads/Seeed_Arduino_DAPLink-master.zip

Install the Adafruit_TinyUSB_Arduino Library

Note

If you have an error caused Adafruit_TinyUSB_Library when uploading sketch to Xiao, Use Adafruit_TinyUSB_Library Version 0.10.5 .

  • Open the Arduino IDE, and click sketch -> Include Library -> Add .ZIP Library, and choose Downloads/Adafruit_TinyUSB_Arduino-master.zip

Setup Xiao in Arduino

  • Preference -> Additional Boards Manager URLs https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

  • Tool -> Boards -> Boards manager -> Search Xiao

  • Install Seeed SAMD Boards

Open the sketch

  • Unzip Seeed_Arduino_DAPLink-master.zip
  • Open Seeed_Arduino_DAPLink-master/examples/simple_daplink/simple_daplink.ino

Upload the sketch to Xiao

  • Upload the sketch to Xiao
    • LEDs on Xiao one green -> two blue

Make Xiao to SWD adapter boards

Wiring

ref .How to use Arduino Boards as DAPLink Device

ref. class site

Eagle



Eagle .sch .brd

ref. Eagle holes making

1
2
SET FILL_LAYER 116 1;
run drill-aid 0

BOM

Item Qty Price Link
Seeed Xiao 1 4.9USD, 556JPY seeed, digikey, Amazon 3P
Pin Header(1x7) 2 some
Pin Socket(1x7) 2 some
wire from THT resistor 2 almost free

Boards

Install OpenOCD

Mac

ref. OpenOCD

1
$ brew install openocd

Download bootloader for SAMD11

Burn bootloader

Connection

PC(USB-C) - Xaio(SWD) - SAMD11_Board
3.3V will be supplied via SWD

Burn

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$ cd Downloads/atsamd11-master/bootloader
$ ls
sam_ba_Generic_D11C14A_SAMD11C14A.bin
openocd.cfg
unprotect_bootloader.cfg

$ openocd
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
none separate
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 2.0.0
Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 1 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 400 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd11c14a.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* at91samd11c14a.cpu cortex_m   little at91samd11c14a.cpu running
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000004a0 msp: 0x20000ffc
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000004a0 msp: 0x20000ffc
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD11C14A (16KB Flash, 4KB RAM)
wrote 4096 bytes from file sam_ba_Generic_D11C14A_SAMD11C14A.bin in 1.113787s (3.591 KiB/s)
** Programming Finished **
** Verify Started **
verified 3904 bytes in 0.466176s (8.178 KiB/s)
** Verified OK **
shutdown command invoked

$ ls /dev | grep usb
cu.usbmodem14401
tty.usbmodem14401

Last update: November 22, 2021