Example of blinking LED on LPCXpresso54608 board (OM13092)

LPC-LINK2 Debug Probe Firmware update required with MBED firmware to enable the mbed flash disk interface (board is seen as MSD mass storage device) so drag and drop programming is possible

tested on Windows 7

Based on

https://os.mbed.com/platforms/LPCXpresso54608/

and

https://os.mbed.com/teams/NXP/wiki/Updating-LPCXpresso-firmware

you need to update your LPCXpresso (programmer/debugger) to the latest firmware to enable the mbed flash disk interface.

Note that for LPCXpresso54114 and LPCXpresso546xx boards there is a 2-step programming process (first bootloader needs to be installed, then binary for LPC546xx board).

Detailed guide as follows:

1. Go to LPCScrypt webpage and download its latest version (needs admin rights)

2. Go to DOCUMENTATION section of above link and select “LPC-Link2 Debug Probe Firmware Programming”

3. Configure the selected board to DFU Boot, then connect to the host computer via USB

  • In case of: OM13092/LPCXpresso54806
    • check jumper JP5 “DFU LINK” (needs to be installed) – to download firmware from IDE

4. Download Link2 (LPC432x) Bootloader binary (Use this Bootloader first for boards that require a 2-step update)

  • https://os.mbed.com/media/uploads/mmahadevan/lpc4322_bl_crc.bin
  • Save to directory of LPCScrypt
    • C:\nxp\LPCScrypt_2.0.0_831\probe_firmware\LPCXpressoV2
    • LPCXpressoV2 folder has been chosen because I was able to find an info that debug probe LPC432x is being programmed with LPC432x_IAP_CMSIS_DAP_V5_183.bin file (and this file is in LPCXpressoV2 folder)
      • to confirm that please go to Start -> start typing LPC -> choose “Program LPC-Link2 with CMSIS-DAP”

5. Make a copy of program_CMSIS.cmd file in C:\nxp\LPCScrypt_2.0.0_831\scripts and call it program_CMSIS_mbed_daplink.cmd

  • Open with Notepad++ program_CMSIS_mbed_daplink.cmd file
  • edit:

before
set Link2ImageWild=LPC432x_IAP_CMSIS_DAP_*.bin

after
set Link2ImageWild=lpc4322_bl_*.bin
  • or comment (by adding REM)

before
set Link2ImageWild=LPC432x_IAP_CMSIS_DAP_*.bin

after
REM set Link2ImageWild=LPC432x_IAP_CMSIS_DAP_*.bin
    set Link2ImageWild=lpc4322_bl_*.bin

6. Go to Start -> cmd

  • go to directory

cd C:\nxp\LPCScrypt_2.0.0_831\scripts
  • type command
    • program_CMSIS_mbed_daplink
    • because of changes in program_CMSIS_mbed_daplink.cmd, now file downloaded from MBED called lpc4322_bl_crc.bin is executed
    • Ctrl+C to quit

7. Disconnect the board

8. Remove the jumper JP5 “DFU LINK”

9. Connect again the board

  • In that step board should be seen as MAINTANANCE

10. Go to https://armmbed.github.io/DAPLink/ and type in the box 54608, then you will see firmware file called

  • 0251_lpc4322_lpc54608xpresso_0x10000.bin
  • Download the firmware file
  • Save wherever you want
  • Drag-and-drop the firmware file onto the mounted drive called MAINTANANCE
  • Wait for the file copy operation to complete
  • Power cycle the board. It will now enumerate and mount as DAPLINK or the name of the board

11. Ready for drag and drop programming

Committer:
marcinch
Date:
Thu Dec 06 09:53:03 2018 +0000
Revision:
0:09421d80c468
Child:
1:e158e4f407da
Initial commit (this is blank default "mbed-os-example-blinky" created to work with NXP LPC54608)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
marcinch 0:09421d80c468 1 /* mbed Microcontroller Library
marcinch 0:09421d80c468 2 * Copyright (c) 2018 ARM Limited
marcinch 0:09421d80c468 3 * SPDX-License-Identifier: Apache-2.0
marcinch 0:09421d80c468 4 */
marcinch 0:09421d80c468 5
marcinch 0:09421d80c468 6 #include "mbed.h"
marcinch 0:09421d80c468 7 #include "stats_report.h"
marcinch 0:09421d80c468 8
marcinch 0:09421d80c468 9 DigitalOut led1(LED1);
marcinch 0:09421d80c468 10
marcinch 0:09421d80c468 11 // main() runs in its own thread in the OS
marcinch 0:09421d80c468 12 int main()
marcinch 0:09421d80c468 13 {
marcinch 0:09421d80c468 14 SystemReport sys_state(500 /* Loop delay time in ms */);
marcinch 0:09421d80c468 15
marcinch 0:09421d80c468 16 while (true) {
marcinch 0:09421d80c468 17 // Blink LED and wait 0.5 seconds
marcinch 0:09421d80c468 18 led1 = !led1;
marcinch 0:09421d80c468 19 wait(0.5f);
marcinch 0:09421d80c468 20
marcinch 0:09421d80c468 21 // Following the main thread wait, report on the current system status
marcinch 0:09421d80c468 22 sys_state.report_state();
marcinch 0:09421d80c468 23 }
marcinch 0:09421d80c468 24 }