24.10.2012 Views

J-Link / J-Trace User Guide (UM08001) - Microcontrollers

J-Link / J-Trace User Guide (UM08001) - Microcontrollers

J-Link / J-Trace User Guide (UM08001) - Microcontrollers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

esults.<br />

Clearly 1. is the easiest solution and is recommended.<br />

This information is applicable to the following devices:<br />

• AT91SAM7S (all devices)<br />

• AT91SAM7SE (all devices)<br />

• AT91SAM7X (all devices)<br />

• AT91SAM7XC (all devices)<br />

• AT91SAM7A (all devices)<br />

7.2.1.3 Recommended init sequence<br />

In order to work with an ATMEL AT91SAM7 device, it has to be initialized. The following<br />

paragraph describes the steps of an init sequence. An example for different software<br />

tools, such as J-<strong>Link</strong> GDB Server, IAR Workbench and RDI, is given.<br />

• Set JTAG speed to 30kHz<br />

• Reset target<br />

• Perform peripheral reset<br />

• Disable watchdog<br />

• Initialize PLL<br />

• Use full JTAG speed<br />

Samples<br />

GDB Sample<br />

# connect to the J-<strong>Link</strong> gdb server<br />

target remote localhost:2331<br />

monitor flash device = AT91SAM7S256<br />

monitor flash download = 1<br />

monitor flash breakpoints = 1<br />

# Set JTAG speed to 30 kHz<br />

monitor endian little<br />

monitor speed 30<br />

# Reset the target<br />

monitor reset 8<br />

monitor sleep 10<br />

# Perform peripheral reset<br />

monitor long 0xFFFFFD00 = 0xA5000004<br />

monitor sleep 10<br />

# Disable watchdog<br />

monitor long 0xFFFFFD44 = 0x00008000<br />

monitor sleep 10<br />

# Initialize PLL<br />

monitor long 0xFFFFFC20 = 0x00000601<br />

monitor sleep 10<br />

monitor long 0xFFFFFC2C = 0x00480a0e<br />

monitor sleep 10<br />

monitor long 0xFFFFFC30 = 0x00000007<br />

monitor sleep 10<br />

monitor long 0xFFFFFF60 = 0x00480100<br />

monitor sleep 100<br />

# Setup GDB for faster downloads<br />

#set remote memory-write-packet-size 1024<br />

set remote memory-write-packet-size 4096<br />

set remote memory-write-packet-size fixed<br />

monitor speed 12000<br />

break main<br />

load<br />

continue<br />

J-<strong>Link</strong> / J-<strong>Trace</strong> (<strong>UM08001</strong>) © 2004-2010 SEGGER Microcontroller GmbH & Co. KG<br />

157

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!