Use blhost to program/erase LPC54(S)0xx flash

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

Use blhost to program/erase LPC54(S)0xx flash

Use blhost to program/erase LPC54(S)0xx flash

Note: This document provides a simple description, the details about flashloader can be found at Getting Started with LPC540xx Flashloader User's Guide.pdf which is located in SDK_2.5.0_LPCXpresso54S018\middleware\mcu-boot\doc

 

  • Download LPC54S0xx SDK.

 

  • Compile the flashloader project to generate flashloader.bin
    •  The project is located in sdk\boards \lpcxpresso54s018\bootloader_examples\flashloader

 

  • Use dfu-util.exe or IDE to load flashloader.bin into RAM.
    • dfu-util can be downloaded from http://dfu-util.sourceforge.net/releases/
    • Configure the ISP pins and then reset the chip to make the chip to enter USB1 DFU boot mode.
    • Boot mode

      ISP2

      PIO0_6 pin

      ISP1

      PIO0_5 pin

      ISP0

      PIO0_4 pin

      Description

      USB1 DFU boot

      LOW LOW HIGH

      USB DFU class is used to download image over the USB1 high-speed port into SRAM.

    • Connect the LPC54S0xx device USB1 high-speed port and PC with USB. The following is the command line to load the flashloader.bin:

$ dfu-util.exe –D flashloader.bin

 

  • Use blhost to program/erase LPC540xxM/LPC54S0xxM flash
    • Once the flashloader binary is downloaded and starts its execution on the LPC54S0xx platform and there remains a physical USB connection between the LPC54S0xx platform USB1(High-Speed) and host, the flashloader will be ready to receive the commands.

    • blhost -u 0x1fc9,0x01a2 -- get-property 12
    • blhost -u 0x1fc9,0x01a2 -- fill-memory 0x2000d000 4 0xc0000004
    • blhost -u 0x1fc9,0x01a2 -- configure-memory 0xa 0x2000d000
    • blhost -u 0x1fc9,0x01a2 -- get-property 25 0xa
    • blhost -u 0x1fc9,0x01a2 -t 100000 -- flash-erase-region 0x10000000 0x100000
    • blhost -u 0x1fc9,0x01a2 -t 100000 -- write-memory 0x10000000 xxx.bin

Note: xxx.bin is the target file which needs to be downloaded to the flash.

 

Author: Hao Liu 

Thanks for Hao Liu.

Tags (1)
Comments

Dear Alice-san,

$ dfu-util.exe –D flashloader.bin

I think I need a driver before doing the above, where can I get the driver?

Best Regards,

Yasushi Hasegawa

No ratings
Version history
Last update:
‎07-15-2022 12:16 AM
Updated by: