This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello all,
On chip OAD
3 codes
1) BIM - decides which image to run (persistent or user), by using number of 0 in validation field.
2) persistent - job to take a image from outside and load into internal flash and validate it by signature and CRC.
If error comes, read it again untill 16 times.
If no error, make a validation field FFFF and restart application.
3) user appl - actual image need to be load either by BIM-->persistent or directly 1st time.
This is my understanding, but i would like to know that in On chip OAD concept can we place 2 user application in Internal Flash or not?
is Original user application will be lost while doing OAD?
If lost user application then again after restart only 2 files(codes) will be available 1) BIM for checking persistent to go or user application to run. 2) Persistent code to take a data(Binary Image) from outside to internal flash.
little bit confusion?
Thanks,
Anil D.
Hey Anil,
There are 2 applications stored in Internal Flash (apart from the BIM), the persistent image and the user application. You should be able to add user application to the persistent image, but I would be careful to not disrupt any of the logic of the persistent image when it comes to OAD or you will lose your fail-safe. If you would like to keep the persistent image unmodified and add a second user application, see below.
Out of the box, there is no support for 2 separate user applications. Adding this support would require you to modify every project in the process. For example, the BIM would have to be modified to select which user application would be loaded on startup (you will also have to implement how the BIM will know which image to start, maybe a variable in NV memory can be read).The persistent image will also have to be modified so that it performs the OAD to the proper flash locations, and you will have to manage the flash layout so that you don't overwrite the other user application by mistake. Finally the user applications will require modification to support the new OAD process, similar to the changes made to the persistent application.
Anil Dhanawade said:If lost user application then again after restart only 2 files(codes) will be available 1) BIM for checking persistent to go or user application to run. 2) Persistent code to take a data(Binary Image) from outside to internal flash.
Your understanding here is correct. I assume that when you say the user application is lost, that the user application has been corrupted by some CRC error during the OAD process. If an on-chip OAD fails, the BIM will load the persistent image. If your persistent image is the original image, then it will not be lost. If the user application is your "original" image, then yes, it will be lost and the OAD will have to be retried.
Hello Amman,
Can you describe more about persistent image. Where can i get this program?
2) persistent - job to take a image from outside and load into internal flash and validate it by signature and CRC.
If error comes, read it again untill 16 times.
If no error, make a validation field FFFF and restart application.
is above consideration of mine is correct about persistent iamge?
i worked on Beagle bone what i have done there that, i created 2 partition there. so 1 will be original current running image and another one is like old image. So when OAD comes then old image will get replaced. and if OAD fails then code will work with original image as previously.
So like that i am thinking to implement here.
is it possible here? meanwhile i will clear my persistent image conept.
Thanks,
Anil D.
Hello Ammar,
I checked a persistent Code "sensor_oad_onchip_persistent_secure_CC1352P1_LAUNCHXL_tirtos_ccs_syscfg" i think this is the only one code i found.
but by quick check by code i can say its same like sensor code only. so what a difference between sensor code and sensor persistent code?
Can you clarify something?
Thanks,
Anil D.
The differences are wrapped around the OAD_IMG_A define. The persistent app doesn't send sensor data periodically like the sensor code. There are more difference, but I would search for that define in the project to see all of the differences.
Okay Amman,
I got your point, its normal image, it doesn't contain Full functionality of Sensor. i think it has only such functionality which is required for this application.
Thanks Amman for your Time.
Anil D