UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
409 of 464
NXP Semiconductors
UM10850
Chapter 29: LPC5410x Serial Wire Debug (SWD)
29.6.3 Boundary scan
The RESET pin selects between the test TAP controller for JTAG boundary scan
(RESET = LOW) and the ARM SWD debug port TAP controller (RESET = HIGH). The
ARM SWD debug port is disabled while the part is in reset. A LOW on the TRST pin resets
the test TAP controller.
Remark:
Boundary scan operations should not be started until 250
s after POR. The test
TAP must be reset after the boundary scan and left in either TLR or RTO state. Boundary
scan is not affected by Code Read Protection.
Remark:
POR, BOD reset, or a LOW on the TRST pin puts the test TAP controller in the
Test-Logic Reset state. The first TCK clock while RESET = HIGH places the test TAP in
Run-Test Idle mode.
29.6.4 In-System Programming Access Port (ISP-AP)
The ISP-AP is essentially a register-based communication port that may be accessed by
both the CPU and the device debug port.
This port is used to implement certain commands that can operate even when the device
has been programmed to the highest Code Read Protection level (CRP level 3). The
ISP-AP is active whenever the device is attached to a debugger.
29.6.4.1 Resynchronization request
Communication with the ISP-AP is initiated by the debugger. The debugger first sets the
RESYNCH_REQ bit in the CSW register. The debugger must then reset the device by
either writing a 1 to the CHIP_RESET_REQ bit in the CSW, or by driving the actual reset
pin of the device if it is able to do so.
29.6.4.2 Acknowledgement of resynchronization request
After requesting a resynchronization and resetting the device, the debugger reads the
CSW register. This stalls the debugger if the device has not yet completed the
resynchronization process. The debugger can repeat this process until it is able to read
the CSW and find a 0 there.
29.6.4.3 Return phase
Following the initial resynchronization, communication by the debugger to the device is in
the form of 32-bit writes to the REQUEST register. The debugger can read the result in the
RETURN register. The debugger polls the RETURN register in the same manner as it
polled the CSW following a resynchronization request.
29.6.4.4 Error handling
If an overrun occurs from either side of the communication, the appropriate error flag is
set in the CSW. Once such an error occurs, the debugger will need to start with a new
resynchronization request in order to clear the error flag.
29.6.4.5 Register description
The registers in the ISP-AP are show below. These registers are readable by the CPU
and are intended primarily to allow on-chip ROM routines to implement requests from an
external debugger.