Part Number: CC2642R
Tool/software: TI C/C++ Compiler
Hi,
I started using the new cc2642R1 chip, and I was hoping the "on chip" OAD option will allow two images to be stored on flash, having a backup image in case something goes wrong during OAD.
The size of my application (user+stack) is 187K (which is 53% of the available flash, excluding the 8k flash for last page) - this means two images will not fit.
The concern I have with the "on chip" OAD concept described here: http://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/3.30.00.03/exports/docs/ble5stack/ble_user_guide/html/oad-secure/flash-layout-on-chip-stack-library.html#constraints-and-requirements-for-on-chip-oad-stack-library is that the persistent app must be small and thus implying limited functionality and in case something goes wrong during the OAD, the device will be in limited mode.
In my case, this device is driving a co-processor and the fact that there is chance that the main application could get corrupted during OAD is simply not acceptable.
To solve this, I obviously have the option to try to reduce my application (app+stack) size (by removing certain features unfortunately) such that I can fit two instances on the flash, then modify BIM accordingly, while the applications themselves handle the actual OAD (receive the actual FW bytes). In my case, the new FW image is going to come through a serial connection, and the functionality to receive and handle the image is embedded into my main app - to receive new FW bytes, store them at the proper location on internal flash and let BIM take over and see if new image is valid - similar concept as the sample BIM, if new image is not valid, then we have the old image.
My question is:
Is it possible (does TI have an example) such that stack is linked separately so it is not included in both instances of the app. If this can be done, then I should be able to fit 1 x stack + 2 user apps on the 360K flash. This is exactly as the old cc2460 chips were handling this, and now it seems to me this concept will give me the redundancy of the OAD implementation I am looking for.
Is there anything else/another option TI can suggest to utilize to be able to make the OAD process failure prof - so we don't overwrite the main image of the user app and have no fallback in case something goes wrong?
Obviously, adding a flash chip will solve this, but I was hoping something else can be done - Thanks for your help and suggestions!
Ivan S.