NXP LPC4322 Application Note

AN13206
Modifying Debug Firmware on i.MX RT10xx Boards Featuring An LPC4322-based Debug Probe
Rev. 0 — 04/2021

Contents

1 Introduction

Several NXP evaluation boards in the i.MX RT10xx series have a debug circuit based on the LPC4322 MCU. Besides the default firmware, this circuit can use an NXP-proprietary CMSIS-DAP based image that also supports SWO features and this firmware is referred to as LPC-Link2. This image also provides higher performance flash programming but does not include drag-drop programming capability. The LPC4322 debug circuit also has an option for an evaluation version of SEGGER’s popular J-Link probe. i.MX RT10xx EVKs are factory programmed with an OpenSDA based CMSIS-DAP implementation with drag-drop programming capability, but it is possible to run any of the three firmware options on these i.MX RT10xx boards.
Table 1 describes the differences among the three firmware options.
Table 1. Comparison of firmware options
1 Introduction......................................1
2 Programming LINK2 CMSIS........... 2
3 Programming LPC-Link2 Segger J-
Link..................................................3
4 Switching back to OpenSDA DapLink
firmware (factory default firmware)
........................................................ 4
4.1 Getting the firmware images........4
5 Revision history...............................6
Application Note
OpenSDA Daplink
Power via USB (automatic target regulator control)
SWD debug with MCUXpresso IDE
SWO trace/profiling/ITM
Drag/drop programming
UART-USB (VCOM)
Flash programming speed (relative to OpenSDA) 1X 3-4X 4X
Only the OpenSDA firmware version controls the regulator which power the target processor. When using the firmware other than the default one, the power must be provided by other power sources. Such as a barrel-type power connector or USB1 connector. For the power information, the hardware users guide can be a reference. The supply is at least 500 mA so that brownouts do not occur in high current applications (such as graphics with backlit displays).
This application note describes how to the program the on-board debug probe board firmware with LINK2-CMSIS or J-Link firmware and how to switch back to the OpenSDA firmware (factory default.)
The hardware used in this application note is MIMXRT1060-EVK (Rev.A1) but the same techniques can be used with any i.MX RT10xx EVK with an LPC4322 debug probe. The utility used to update the firmware of LPC43xx/18xx devices is called LPCScrypt, and this utility can be found at LPCScrypt v2.1.2.
LPC-Link2
CMSIS-DAP
LPC-Link2
Segger J-link
NXP Semiconductors
NOTE When programming the J-link firmware with LPCScrypt, use an updated firmware image from SEGGER, as updates to their firmware are required from time to time.

2 Programming LINK2 CMSIS

1. Download and install LPCScrypt.
2. Install the LPC4322 DFU jumper, J42 on MIMXRT1060-EVK, to force DFU boot mode.
Figure 1. DFU jumper
3. Power on the board through the on-board debug probe USB connector, J41 on MIMXRT1060-EVK.
Programming LINK2 CMSIS
NOTE
Connect 3-4 of J1 to power the board from USB port and then connect LINK2 to LPC4322 debug port, J34.
4. Go to the scripts subdirectory and run the program_CMSIS.cmd to run the script to program the debug probe for CMSIS. The default path for .cmd files is:
C:\nxp\LPCScrypt_2.1.2_57\scripts
Figure 2. Select program_cmsis
5. Follow the on-screen instructions. Press any key to load the program and the script output shows that the firmware is updated successfully.
Modifying Debug Firmware on i.MX RT10xx Boards Featuring An LPC4322-based Debug Probe, Rev. 0, 04/2021
Application Note 2 / 7
NXP Semiconductors
Programming LPC-Link2 Segger J-Link
Figure 3. CMSIS firmware image programming output
6. As shown in Figure 3, there is a log showing the firmware has been programed successfully. Then, remove the jumper of J42 to exit the DFU mode and re-power the board.

3 Programming LPC-Link2 Segger J-Link

The procedure of updating the mode into J-link is the same as LPC-Link2 CMSIS-DAP, except for running the Program_JLINK.cmd.
Figure 4. Select program_JLINK
Figure 5 shows the output of a successful programming session.
Modifying Debug Firmware on i.MX RT10xx Boards Featuring An LPC4322-based Debug Probe, Rev. 0, 04/2021
Application Note 3 / 7
Loading...
+ 4 hidden pages