# SWD In-circuit programming using Atmel ICE

<abstract>
This article illustrates how to use the SWD section od Atmel ICE In-circuit  programmer with the Berta H10 board
</abstract>

<img src="./swd_icsp_atmel_ice.jpg">

This is the wirings between the Atmel ICE SAM porte and the Barta-H10 J12 PROG port.

| Atmel ICE SAM port pin # | Berta-H10 J12 pin # | Signals          |
|--------------------------|---------------------|------------------|
| 1           			   | 1                   | NRST             |
| 2                        |                     |                  |
| 3                        |                     |                  |
| 4                        |                     |                  |
| 5                        |                     |                  |
| 6                        | 6                   | GND              |         
| 7                        | 7                   | SWCLK            |         
| 8                        |                     |                  |
| 9						   | 9                   | SWDIO            |
| 10                       |                     |                  |

If you [intend to BUY](/pricelist?category=icsp) an Atmel ICE programmer from the Acme Systems eShop ask
for a free Atmel ICE to Berta-H10 adapter.


To transfer a firmware to Berta-H10 type this command:

	make flash
	
	...
	### Flashing Target ###
	Debugger: ATMEL Atmel-ICE CMSIS-DAP J41800042702 1.0 (SJ)
	Clock frequency: 16.0 MHz
	Target: SAM R34J18B (Rev C)
	Verification...
	at address 0x48 expected 0x11, read 0x0d
	Error: verification failed
	Debugger: ATMEL Atmel-ICE CMSIS-DAP J41800042702 1.0 (SJ)
	Clock frequency: 16.0 MHz
	Target: SAM R34J18B (Rev C)
	Programming.......... done.
	Verification.......... done.
	Done flashing
	
## Links

* @article='h10_berta_getting_started'
