Dual Enhanced Image LPC54616

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

Dual Enhanced Image LPC54616

422 Views
apexman
Contributor I

Hello,

I would like to use the Dual Enhanced Image capability such that one image is used to program flash while the other is the main program. I understand that one image must reside at address 0x0000 while the other image on a sector boundary. Upon boot up, the image with the larger version will get executed. I have created 2 separate images each with their own version to prove that I can run one image versus the other. So far, this has worked. If I change the version, then compile, it will run the program with the greater version. 
My question is, how can I have it so I can run the "update" image when needed? If the main image has a higher version, it will always jump to that which does not have the update capability.
If when I boot up my main program runs (with the higher version), how can I possibly get the "uploader" to run?

Thank You,

Gennaro

Labels (1)
0 Kudos
3 Replies

321 Views
apexman
Contributor I

Sorry for the late reply. (Thought I sent a reply already).
I already read the link you are referring to, but I don't think that would resolve my problem.
What I want to do is be able to load my "download app" at any given time so that I can upgrade my "main app"
The idea here was to have the "download app" in one image while the "main app" was in another image.
If I set the version number to a value higher in the "download image" than the "main image", then I get the "download app" to execute.
Once it is running, the user can update the main image which would also set the version number larger than the "download image"
Upon toggling power, the "main image" will now run. 
The issue is how to get the "download image" to run again when needed.
The only thing I can think of is to have an interrupt routine in the "main image" that senses a GPIO input that would write to the OCM at the version number location of the second image. Is the "dual enhanced image header" always in a known location?
Would it be possible to get the address via the Vector Table of the second image (which has a pointer to the "image marker")?
I was really hoping that the image could be controlled by an external signal, but that doesn't seem to be the case.
Any help is appreciated. Thank you.

0 Kudos

313 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @apexman 

About your requirements, recommend you do not use  "Dual Enhanced Image" function.

Config your "download app"  as secondary bootloader, and start the code from 0x0000.Then use this secondary bootloader update "main image". Config" main image" offset memory after "download app". In secondary bootloader can design run routine, for example use GPIO.

 

BR

Alice

0 Kudos

386 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @apexman 

How about refer to the method from thread:

https://community.nxp.com/t5/LPC-Microcontrollers/CRC-setup-for-enhanced-images/m-p/938219  

"By setting the "update image" to the highest version until the main image has been loaded and verified valid via a software MD5 check.  Should the download of the main firmware complete, be programmed into flash, and pass the MD5 check I set the main firmware to the highest version number, thus allowing main to load on boot."

 

BR

Alice

0 Kudos