How to Recover LPC Evaluation Board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Recover LPC Evaluation Board

How to Recover LPC Evaluation Board

This document was made to explain how to regain control of any LPC EVK on brick mode without using an external debugger.

Explore the simple way.

In some cases, this method forms well and is the easy way, open your IDE and select your project.

Pavel_Hernandez_0-1701210689026.png

 

At this point you may have a debugger configuration of your last debug session, so, you have similar icons to the image.

Open the tab below and select erase.

Pavel_Hernandez_1-1701210712299.png

Depending on your debugger configuration you need to select the same icons below.

Note: In some cases will be necessary to put your MCU in ISP.

And that’s all, could try if the MCU is out the brick mode.

 

Introduction

First, you need to install these tools on your PC.

LPCScrypt [LPCScrypt v2.1.2 | NXP Semiconductors].
J-Link Commander. [J-Link Commander (segger.com)].


To understand this document, we need to know that every EVK [Evaluation Kit] can be divided into 2 parts. The debugger on the board Link2 and the target LPC55sXX.

Pavel_Hernandez_2-1701210828544.png

Figure 1. Link2 Green square, LPC55sXX Red square

This document will describe two methods that must be done in the order mentioned because we will see how to update the firmware of the debugger to use the same board for a self-recovery, this step is necessary for the tool J-Link Commander to recognize the debugger as a Segger probe, then when the update is done the second step should be to enter ISP mode to do a mass erase of the target to get out of the brick mode.

Link2

The Link 2 (LPC4370) debugger on the board probe can be configured to support various development tools and IDEs using a variety of different downloadable firmware images.

Available firmware images include:

  • J-Link by Segger.
  • LinkServer.

By default, the EVK board has the firmware LinkServer on the LPC4322 (dependent on your board), for this proposal we will see how to change to J-Link On-Board.

DFU

The EVK needs to be prepared to receive this firmware on the debugger, to do that we need to put the board on DFU [Device Firmware Update].

On the schematic need to find the DFU jumper to put on the board, the image below is an example of different EVKs check Figure 2.

Pavel_Hernandez_3-1701210914810.png Pavel_Hernandez_4-1701210920383.png

Figure 2. DFU from different boards.

Then connect it to the PC.

Note: The firmware update is completely reversible.

LPCScrypt

Once installed on the PC we need to locate these files of the installation.

Root example: C:\nxp\LPCScrypt\scripts

Pavel_Hernandez_21-1701211339940.png

When you have the board on DFU, connecting the USB Llink2 to the PC and then RUN the Scrypt (program_JLINK) in CMD check Figure 3.

Press any key to continue…

Pavel_Hernandez_5-1701210979831.png

Figure 3. Flash firmware of J-Link in DFU mode.

Successfully done, at this moment the EVK has the firmware of J-Link Segger. Review the Figure 4.

Pavel_Hernandez_6-1701210985238.png

Figure 4. The firmware was flashed successfully.

Remove the USB cable to remove the DFU jumper with the board unpowered.

ISP

Brief of ISP (In System Programming) this method is used to recover a part programmed with a corrupted image which is not detectable by ROM.

So, to enter this mode the user needs to put a jumper in the ISP header pins, search for this in the schematic, then connect to the PC and check Figure 5.

 

Pavel_Hernandez_7-1701211021248.png Pavel_Hernandez_8-1701211031668.png

Figure 5. ISP image examples from different boards.

J-LINK Commander

Open the software and if the communication is right the message will appear J-Link via USB… OK check Figure 6.

Pavel_Hernandez_9-1701211068479.png

Figure 6. The EVK is now communicating to the tool J-Link Commander.

Commands

To start the communication needs to send the command “connect”.

Then the tool shows your last target (if you use it) and use the next command “?” to change the target review Figure 7.

Pavel_Hernandez_0-1701284350733.png

Figure 7. Review the target.

In the new popup window in the green area, you need to put the name of the target, take care you do not put the debugger check Figure 8.

Pavel_Hernandez_11-1701211103304.png

Figure 8. In the green area, you need to put the matricula of the MCU target.

Example [LPC55s16 or LPC55s69] depending of your target check Figure 9.

Pavel_Hernandez_12-1701211112963.png

Figure 9. If the tool supports the MCU will show below the red square.

In the next selections the tool is asking for the interface of communication, the communication of the EVK is SWD, and for that write “S” as SWD.

On speed, only click enter without entry. Then this will appear before the connection check Figure 10.

Pavel_Hernandez_13-1701211127708.png

Figure 10. The communication is Done.

Then use the command “erase” like the Figure 11.

Pavel_Hernandez_14-1701211135147.png

Figure 11. The tool indicate the erase is done.

Finally disconnect the USB and remove the ISP jumper, then open the IDE and test the blinky led example, or if you wanted you could use the BLHOST.

Flashing the MCU using  BLHOST.

At this step you could able to use the IDE or use BLHOST.

You could install SPSDK if you wanted [Installation Guide — SPSDK documentation].
In ISP mode…
blhost -p COMxx  get-property 1

Pavel_Hernandez_15-1701211154221.png

Figure 12. The first command is to check the communication.


blhost -p COMxx flash-erase-all

Pavel_Hernandez_16-1701211159483.png

Figure 13. Do a mass erase.


blhost -p COMxx write-memory 0 C:\root_example\Debug\led_blinky.bin

Pavel_Hernandez_18-1701211204544.png

Figure 14. The flashing was done.

Remove the ISP jumper and reset your device.

Common error

LPCScrypt

If the message appears “Nothing to boot”, need to be sure the board is connected to the PC with the DFU mode in LINK 2 check Figure 16.

Pavel_Hernandez_19-1701211231685.png

Figure 16. The red square is an example of an error communication.

J-Link Commander

If a similar message appears, “Cannot connect to target”, need to put the target in ISP mode, and return to the first steps with J-Link commander check Figure 18.

Pavel_Hernandez_20-1701211257113.png

Figure 18. Show how the communication is not done.

Labels (1)
No ratings
Version history
Last update:
‎11-29-2023 12:02 PM
Updated by: