LPC51U68 Primary Bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC51U68 Primary Bootloader

1,602 次查看
CKONG
Contributor I

Hi,

Is LPC51U68 supports dual image from primary bootloder?

If not, is there a register that MCU can set to instruct LPC51U68 to boot up from a particular flash address?

If yes, can this register be set via SPI or I2C interface?

 

Note:

I am aware that external MCU is able to instruct LPC51U68 to boot up in a particular flash address after entering ISP mode (eg. via SIP-SPI's SH_CMD_BOOT command). However, this require the LPC51U68 to enter ISP mode everytime it boot up.

I am looking for a more "permanent" solution whereby LPC51U68 will always boot up from this particular flash address without entering ISP mode.

 

0 项奖励
回复
5 回复数

1,589 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to section 3.2 Pin description as following fig, I copy from the UM11071.pdf.

If you do not want to enter ISP mode, pls connect a pull-up resistor on the PIO0_31 pin, in this setting, the ISP mode is bypassed, the LPC51U68 will execute application code directly.

xiangjun_rong_0-1719564688044.png

Hope it can help you

BR

XiangJun Rong

 

标记 (1)
0 项奖励
回复

1,586 次查看
CKONG
Contributor I

Dear XiangJun,

I think you misunderstood my questions:

1. Can LPC51U68 supports dual image from primary bootloder?

2. If not, is there a register that MCU can set to instruct LPC51U68 to boot up from a particular flash address?

3. If yes, can this register be set via SPI or I2C interface?

0 项奖励
回复

1,552 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to section 3.5.2.2 Dual Enhanced (DE) images in the UM11071.pdf for LPC51U68.

It makes it clear that the bootloader of LPC51U68 supports Dual Enhanced (DE) images, but there is not a register to point out the offset of the second image.

For the Dual Enhanced (DE) images, the first image must be located at sector 0 and start address must be 0x00 which is SP pointer. For the second image, it can locate in any sector except for sector 0.

Because there is enhanced image marker, after reset, the bootloader will look for the enhanced image marker, if it found the key words, it make sure the sector includes valid image, then based on the imageHeader pointer, it can look for the version of the image, then determine which image is valid based on version, then execute. For the second image, you have to initialize the Vector Table Offset Register so that the core can get the entry point of the second image.

xiangjun_rong_1-1719819478549.png

 

xiangjun_rong_2-1719819995737.png

Hope it can help you

BR

XiangJun Rong

 

0 项奖励
回复

1,537 次查看
CKONG
Contributor I

Dear XiaoJun,

Thank you for your reply.

Please advise how can external MCU initialize the Vector Table Offset Register?

What is the command(s) external MCU can use?

 

Best Regards,

CK

0 项奖励
回复

1,512 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls note that the two images are different.

When you develop source code which generate image1, you can initialize the Vector Table Offset Register as 0x00.

When you develop source code which generate image2, you can initialize the Vector Table Offset Register as the sector address, the last 6 bits are reserved.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复