at91sam4lXX.cfg 1.0 KB

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