Configure LPC55 to enter/re-invoke ROM Bootloader from application code

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

Configure LPC55 to enter/re-invoke ROM Bootloader from application code

Jump to solution
3,403 Views
jonathanmccarro
Contributor II

Hi,

Is it possible to give an example how to invoke the ROM Bootloader from code.

I dont have the option to use ISP0 pin on hardware to enter Bootloader after resetting device.

Do the CMPA.DCFG_CC_SOCU_PIN and CMPA.DCFG_CC_SOCU_DFLT registers need programmed to do this and if so give example of value to send. Can you tell me how to do it with blhost cmds.

Thanks

Labels (1)
1 Solution
2,895 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi jonathanmccarron‌,

I ask the application team about this and they mention there's an easier way to set this.

If you write the following register, it will be set to boot from the ROM:

PMC->AOREG1 |= (0x0A << 16); //Set to boot from ROM
NVIC_SystemReset();          //Reset

Let me know if this helps you.

Best Regards,

Alexis Andalon

View solution in original post

5 Replies
2,895 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Dear jonathanmccarron‌,

In the SDK from the LPC55s6x there's an example of how to use the IAP function, if you check the fsl_iap.c you will see the next define:

#define BOOTLOADER_API_TREE_POINTER ((bootloader_tree_t *)ROM_API_TREE)

This define will provide you a user application access to APIs exported by the bootloader.

If you check the bootloader_tree_t type, you will see a function called runBootloader.

I hope this helps you.

Best Regards,

Alexis Andalon

0 Kudos
2,895 Views
jonathanmccarro
Contributor II

Dear Alexis,

Thank you for the reply. 

Do you have a small example how I can use this? I just want to call say from within user application.

Does the device reset itself when called with this API or do I have to do software reset etc?

Thanks. 

0 Kudos
2,896 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi jonathanmccarron‌,

I ask the application team about this and they mention there's an easier way to set this.

If you write the following register, it will be set to boot from the ROM:

PMC->AOREG1 |= (0x0A << 16); //Set to boot from ROM
NVIC_SystemReset();          //Reset

Let me know if this helps you.

Best Regards,

Alexis Andalon

350 Views
tejacob
Contributor I

hi,

trying this on lpc55s69-evk and the device restarts, but it doesn't stay in rom boot - it continues to boot the application.

what may be the cause for this?

thanks, jacob

0 Kudos
346 Views
tejacob
Contributor I
i've also tried the `runBootloader` way, as well as this hack: https://github.com/lpc55/lpc55-hal/pull/51/files

all of them behave the same.
0 Kudos