Skip to content

Xiao as SWD direct programmer for pre-burning Bootloader

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
any SWD connection parts 0 none

Eagle


Eagle sch brd

Reverse(PNG)

ref. Eagle holes making

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

Board

IC shape hole Upside down SADM11C is placed on the hole (pin1 is right-up)
library shape with dogbone connectivity between IC legs and IC footprint is good for pre-programming

Bootloader

ref.xiao_as_DAPLink

 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
[~/Downloads/atsamd11-master/bootloader:yuichi] % ls
README.md               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
Error: at91samd11c14a.cpu -- clearing lockup after double fault
Polling target at91samd11c14a.cpu failed, trying to reexamine
Info : at91samd11c14a.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* at91samd11c14a.cpu cortex_m   little at91samd11c14a.cpu halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0xfffffffe msp: 0xfffffffc
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0xfffffffe msp: 0xfffffffc
** 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.114095s (3.590 KiB/s)
** Programming Finished **
** Verify Started **
verified 3904 bytes in 0.467997s (8.146 KiB/s)
** Verified OK **
shutdown command invoked

SAMD11C chip with bootloader is ready to solder a board. The board will be recognize as USB device and upload next.


Last update: March 17, 2021