results.
Clearly 1. is the easiest solution and is recommended.
This information is applicable to the following devices:
•
AT91SAM7S (all devices)
•
AT91SAM7SE (all devices)
•
AT91SAM7X (all devices)
•
AT91SAM7XC (all devices)
•
AT91SAM7A (all devices)
7.2.1.3 Recommended init sequence
In order to work with an ATMEL AT91SAM7 device, it has to be initialized. The follow-
ing paragraph describes the steps of an init sequence. An example for different soft-
ware tools, such as J-Link GDB Server, IAR Workbench and RDI, is given.
•
Set JTAG speed to 30kHz
•
Reset target
•
Perform peripheral reset
•
Disable watchdog
•
Initialize PLL
•
Use full JTAG speed
Samples
GDB Sample
# connect to the J-Link gdb server
target remote localhost:2331
monitor flash device = AT91SAM7S256
monitor flash download = 1
monitor flash breakpoints = 1
# Set JTAG speed to 30 kHz
monitor endian little
monitor speed 30
# Reset the target
monitor reset 8
monitor sleep 10
# Perform peripheral reset
monitor long 0xFFFFFD00 = 0xA5000004
monitor sleep 10
# Disable watchdog
monitor long 0xFFFFFD44 = 0x00008000
monitor sleep 10
# Initialize PLL
monitor long 0xFFFFFC20 = 0x00000601
monitor sleep 10
monitor long 0xFFFFFC2C = 0x00480a0e
monitor sleep 10
monitor long 0xFFFFFC30 = 0x00000007
monitor sleep 10
monitor long 0xFFFFFF60 = 0x00480100
monitor sleep 100
# Setup GDB for faster downloads
#set remote memory-write-packet-size 1024
set remote memory-write-packet-size 4096
set remote memory-write-packet-size fixed
monitor speed 12000
break main
load
continue
J-Link / J-Trace (UM08001)
© 2004-2009 SEGGER Microcontroller GmbH & Co. KG
133
Need help?
Do you have a question about the J-Link and is the answer not in the manual?
Questions and answers