This document was made to explain how to regain control of any LPC EVK on brick mode without using an external debugger.
In some cases, this method forms well and is the easy way, open your IDE and select your project.
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.
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.
First, you need to install these tools on your PC.
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.
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.
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:
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.
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.
Figure 2. DFU from different boards.
Then connect it to the PC.
Note: The firmware update is completely reversible.
Once installed on the PC we need to locate these files of the installation.
Root example: C:\nxp\LPCScrypt\scripts
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…
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.
Figure 4. The firmware was flashed successfully.
Remove the USB cable to remove the DFU jumper with the board unpowered.
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.
Figure 5. ISP image examples from different boards.
Open the software and if the communication is right the message will appear J-Link via USB… OK check Figure 6.
Figure 6. The EVK is now communicating to the tool J-Link Commander.
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.
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.
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.
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.
Figure 10. The communication is Done.
Then use the command “erase” like the Figure 11.
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.
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
Figure 12. The first command is to check the communication.
blhost -p COMxx flash-erase-all
Figure 13. Do a mass erase.
blhost -p COMxx write-memory 0 C:\root_example\Debug\led_blinky.bin
Figure 14. The flashing was done.
Remove the ISP jumper and reset your device.
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.
Figure 16. The red square is an example of an error communication.
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.
Figure 18. Show how the communication is not done.