+proc at91sam9g20_reset_start { } {
+
+ # Make sure that the the jtag is running slow, since there are a number of different ways the board
+ # can be configured coming into this state that can cause communication problems with the jtag
+ # adapter. Also since this call can be made following a "reset init" where fast memory accesses
+ # are enabled, need to temporarily shut this down so that the RSTC_MR register can be written at slower
+ # jtag speed without causing GDB keep alive problem.
+
+ arm7_9 fast_memory_access disable
+ adapter speed 2 ;# Slow-speed oscillator enabled at reset, so run jtag speed slow.
+ halt ;# Make sure processor is halted, or error will result in following steps.
+ wait_halt 10000
+ mww 0xfffffd08 0xa5000501 ;# RSTC_MR : enable user reset.
+}
+
+proc at91sam9g20_reset_init { } {