LPC546xx DFU for SPIFI

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

LPC546xx DFU for SPIFI

1,054 Views
giusloq
Contributor III

I'm using EVB LPCXpresso54628 and I'm experimenting DFU for in-field firmware upgrade through USB and a host PC.

When I reset the target MCU with ISP0 and ISP2 pushbuttons pressed, the bootloader starts in USB0 DFU mode and I can read/write FLASH thorugh standard dfu-util.exe tool.

dfu-util-static.exe -a FLASH -D firmware.bin --reset

In my final application I will have a SPI Flash connected to SPIFI peripheral and I need to write to this SPI Flash (and to internal FLASH) during firmware upgrade.

ROM Bootloader supports only FLASH and RAM, but I need a third section SPIFLASH. I don't think it's possible to configure ROM Bootloader with SPIFLASH section.

What is the best solution to this?

0 Kudos
Reply
5 Replies

1,025 Views
homee
Contributor I

Starbucks Menu Australia Find out everything there is to learn concerning what’s on the Starbucks selection in Australia and what their coffee, frozen drinks, as well as their famous Frappuccino drink cost.

0 Kudos
Reply

1,037 Views
bebyzone6
Contributor I

Culvers Catering Menu Prices: Culvers began as a family-owned restaurant. Craig and Lea Culver, along with Craig’s parents, opened their first restaurant at Sauk City in Wisconsin in 1984.

0 Kudos
Reply

1,039 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The LPC546xx has on-chip flash which can save code and data and you can run code in on-chip flash directly, I do not know why you need to connect spi flash to save code.

Anyway, I agree with you that you can not use on-chip ROM bootloader if you want to connect external SPI flash and save the code in external spi flash. In bootloader mode, FC3 is configured as spi slave mode, so that external host spi in master mode can write image to on-chip flash of LPC546xx.

FC3_SCK          PIO0_0
FC3_SSELO     PIO0_1
FC3_MISO        PIO0_2
FC3_MOSI        PIO0_3

If you do want to connect external spi flash, you can develop a second bootloader, after Reset, the second bootloader is run, in the bootloader, you can set the spi in master mode,  read code and data from the spi flash to internal SRAM, and run in internal RAM.

Hope it can help you

BR

Xiangjun Rong

 

0 Kudos
Reply

1,018 Views
giusloq
Contributor III

I do not know why you need to connect spi flash to save code.

Because internal Flash is not big enough for my data. I don't save code, but constant big data on external Flash (short audio streams, bitmaps, fonts and so on).

If you do want to connect external spi flash, you can develop a second bootloader, after Reset, the second bootloader is run, in the bootloader, you can set the spi in master mode,  read code and data from the spi flash to internal SRAM, and run in internal RAM.

Is it possible to develop a second bootloader that uses DFU over USB0 as an upgrade mechanism? Is it possible to create a custom memory space (SPIFLASH) over DFU? Do you have example?

 

0 Kudos
Reply

1,010 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have checked the USB example, the SDK does not have DFU class example code, you have to develop it yourself.

BR

XiangJun Rong

0 Kudos
Reply