flash: New Spansion FM4 flash driver
[openocd.git] / tcl / target / at91sam4lXX.cfg
blob46c38aef2dd998d566a8a8f86e6f1cc7c5d843ec
1 # script for ATMEL sam4l, a CORTEX-M4 chip
4 source [find target/at91sam4XXX.cfg]
6 set _FLASHNAME $_CHIPNAME.flash
7 flash bank $_FLASHNAME at91sam4l 0x00000000 0 1 1 $_TARGETNAME
9 # SAM4L SMAP will hold the CPU in reset if TCK is low when RESET_N
10 # deasserts (see datasheet 42023E-SAM-07/2013 sec 8.11.3).
12 # smap_reset_deassert configures whether we want to run or halt out of reset,
13 # then instruct the SMAP to let us out of reset.
14 $_TARGETNAME configure -event reset-deassert-post "at91sam4l smap_reset_deassert"
16 # SRST (wired to RESET_N) resets debug circuitry
17 # srst_pulls_trst is not configured here to avoid an error raised in reset halt
18 reset_config srst_gates_jtag
20 # SAM4L starts from POR with SYSCLK set to 115kHz RCSYS, needs slow JTAG speed.
21 # Datasheet does not specify SYSCLK to JTAG/SWD clock ratio.
22 # Usually used SYSCLK/6 is hell slow, testing shows that debugging can work @ SYSCLK/2
23 # but your mileage may vary.
24 adapter_khz 50
26 # System RC oscillator RCSYS starts in 3 cycles
27 adapter_nsrst_delay 0