EasyManua.ls Logo

Segger J-Link - LPC ARM7-Based Devices

Segger J-Link
480 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
402 CHAPTER 15 Device specifics
J-Link / J-Trace (UM08001) ©
2004-2017 SEGGER Microcontroller GmbH & Co. KG
15.11.1 LPC ARM7-based devices
15.11.1.1Fast GPIO bug
The values of the fast GPIO registers cannot be read directly via JTAG from a debug-
ger. The direct access to the registers corrupts the returned values. This means that
the values in the fast GPIO registers normally cannot be checked or changed by a
debugger.
Solution / Workaround
J-Link supports command strings which can be used to read a memory area indi-
rectly. Indirect reading means that a small code snippet will be written into RAM of
the target device, which reads and transfers the data of the specified memory area to
the debugger. Indirect reading solves the fast GPIO problem, because only direct reg-
ister access corrupts the register contents.
Define a 256 byte aligned area in RAM of the LPC target device with the J-Link com-
mand
map ram and define afterwards the memory area which should be read indirect
with the command
map indirectread to use the indirectly reading feature of J-Link.
Note that the data in the defined RAM area is saved and will be restored after using
the RAM area.
This information is applicable to the following devices:
LPC2101
LPC2102
LPC2103
LPC213x/01
LPC214x (all devices)
LPC23xx (all devices)
LPC24xx (all devices)
Example
J-Link commands line options can be used for example with the C-SPY debugger of
the IAR Embedded Workbench. Open the
Project options dialog and select Debug-
ger
. Select Use command line options in the Extra Options tap and enter in the
textfield
--jlink_exec_command "map ram 0x40000000-0x40003fff; map indirec-
tread 0x3fffc000-0x3fffcfff; map exclude 0x3fffd000-0x3fffffff;"
as shown
in the screenshot below.
With these additional commands the values of the fast GPIO registers in the C-SPY
debugger are correct and can be used for debugging. For more information about J-
Link command line options refer to subchapter
Command strings on page 223.

Table of Contents

Other manuals for Segger J-Link

Related product manuals