Boot from internal flash after attempting boot from external flash without success?

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

Boot from internal flash after attempting boot from external flash without success?

672 次查看
JPE
Contributor III

In our hardware we only use the internal flash of a LPC5534.
The ISP-pins (PIO0_7 and PIO0_5) are pulled up externally, but PIO0_5 is also connected to an external comparator.
Under normal circumstances both PIO0_5 and PIO0_7 are HIGH during boot, which selects the "AUTO boot"-mode and loads the image from internal flash.

After switching to a different vendor of the comparator, we now see that PIO0_5 may be LOW during power-up, which selects the "FLEXSPI boot"-mode, and the LPC553x will therefore start the boot sequence with looking for a valid image in the external flash (which doesn't exist), followed by an attempt to boot from the recovery boot device (which also doesn't exist) and finally entering the ISP boot mode (where there is also nothing connected to boot from).

Therefore the boot sequence fails and the CPU never starts up.

Is there ANY way to configure a boot sequence for the LPC553x which attempts to load the image from the internal flash after looking for a valid image in the external flash?
So basically a way to still load the image from internal flash even though the "FLEXSPI boot"-mode has been selected via the ISP-pins?

0 项奖励
回复
4 回复数

631 次查看
JPE
Contributor III

Hi @EdwinHz,

thanks for your fast response, even though that it was not what I had hoped for.

The diagram 26.2.1 with the "Top-level boot flow" also shows, that it should be possible to set a "Default Boot source" in the CMPA to the value 3 for locking the boot sequence to internal flash and ignoring the ISP-pins.

I also found an Application Note (AN13543) which in Table 1 (chapter 1.3) describes how to set the "Boot selection" via the setting of the "CMPA > BOOT_CFG > DEFAULT_BOOT_SOURCE".

Can you confirm this and point me to some resources describing the programming of the CMPA configuration?

BR. Jörn

0 项奖励
回复

558 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @JPE,

You can write on the CMPA by following the example shown on the following community post: Solved: LPC552x: How to write CMPA to disable debug subdomains from application? - NXP Community

Or by using Secure Provisioning Tool. For more information on how to do this on SPT, please look into the User Guide.

 

523 次查看
JPE
Contributor III

Thanks Edwin!

We'll look in to that, but we're also investigating a solution in HW so we can avoid reprogramming the CMPA during manufacturing.

The problem with the code example to reprogram the CMPA internally is, that the MCU might never start up, so we can't execute any code...
And for the external programming we need to have access to the ISP-pins, which are not accessible on our PCB and therefore we would have to program the chips before they are mounted.

0 项奖励
回复

640 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @JPE,

Unfortunately, there is no way of changing the boot process. This boot flow is strictly designed to be executed following "26.2.1 Top-level boot flow" of the RM. If you need to boot from internal flash, you must follow the conditions stated on this diagram.

BR,
Edwin.

0 项奖励
回复