LPC1830 UART3 boot and then, program the qSPI flash

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

LPC1830 UART3 boot and then, program the qSPI flash

325 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by darkknight on Wed Jun 20 20:41:21 MST 2012
We'll be running embedded eCoS in our LPC1830 based product that will have a serial console port and 64Mb qSPI flash. In default mode, I will set up the boot strap pins so that it boots from qSPI flash. However, there won't be any code in the qSPI flash the very first time the product is started up. So, I need to provide a method of in-system programming. Since I'll have the serial console port in the product and LPC1830 supports UART3 boot mode, can I boot via UART3, load code into the processor RAM to transfer bootloader file into the qSPI flash? Once the minimum required bootloader is in the qSPI flash, I'll reset the product and have it boot from qSPI and continue with rest of the programming.

Can the above be done? Boot off of UART3 and program the qSPI flash? Thanks.
Labels (1)
0 Kudos
1 Reply

225 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Thu Jun 21 09:16:14 MST 2012

>can I boot via UART3, load code into the processor RAM to transfer bootloader file into the qSPI flash?
Yes, this can be done.

There are a few approaches to doing this...

>Since I'll have the serial console port in the product and LPC1830 supports UART3 boot mode, can I boot via UART3, load code into the processor RAM to transfer bootloader file into the qSPI flash?
Yes, you can do this, but it implies you'll be changing the boot mode pins (P1.1, P1.2, P2.9, P2.9) when switching back to SPI Flash boot mode for the continuation of the programming sequence. If you use this approach, you'll need some way to alter the boot mode pin states after the initial boot of your programming image via the UART.

An alternative approach would be to use the ISP capability to load your initial image into IRAM and boot it while keeping the board's boot mode jumpers set for SPI Flash. For devices without internal FLASH (1830), you can use the ISP to get your image into IRAM via the UART0. Once your image is programmed, de-assert the ISP (P2.7) pin to allow normal boot, in this case SPI Flash.

Either way will work, but the alternative approach requires only changing one pin state after programming, but it also requires UART0 for FLASHless parts (your using UART3). The first approach requires no special software, just download and run. The alternative approach is a simple protocol based approach, so you'll need a tool such as Flash MAgic to initially program your part (or you can probably write a simple tool to do this).

The LPC43x0 sections on the boot ROM and ISP/IAP programming have some additional information on the process.
http://www.lpcware.com/content/nxpfile/um10503-lpc43xx-user-manual
0 Kudos