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.

CC2541 OAD Image B download of its 'own' code. How?

Other Parts Discussed in Thread: CC2541

Hi, 

I'm trying to implement CC2541 OAD where ImageA is downloader only and ImageB is the main app that runs 99.9% of the time.

Now assuming that when ImageB is running, OAD manager wants to update it with newer version.

Obviously it can not be done from within ImageB itself so it needs in some way 'transfer control' to Image A an/or invalidate itself and transfer control to the BIM (which eventually transfer the control to ImageA since B is invalid).

I couldn't find a description of such scenario in the OAD guide.

Can someone point out to what I'm missing ?

Also, 

Same question with (preferably) no OADTarget profile in ImageB.

Many thanks in advance.

  • Hi,

    The BIM checks for CRC to validate the images. Thus to invalidate the image B you need to change it's CRC. To get the exact address of CRC for Image B, you can refer checkDL() function of Image A source code, in "oad_target.c" file. After downloading the Image B this function calculates the CRC of downloaded image and writes it.

    Hope this help!

    Thanks,

    Dhaval

    Note: If this has answered your question, you may like to click on "Verify Answer'

  • Thanks for your reply.

    Is there a more 'formal' way to transfer control from image B to image A without dealing  with crc modifications ?

    In such case if image B download not starting,  the user  can reset the device and revert to the 'original'  image B?

    Thanks again

  • Hi,

    I don't think that is possible. Because the BIM first checks for valid CRC of Image B, and it make device boots with Image B if it finds valid CRC. If  valid CRC for Image B is not exist, then it checks for valid CRC of Image A and boots with Image A if it finds it valid.

    But if you want to revert to the original Image B before downloading actually starts, then that you can handle in Image A.

    Hope this helps!

    Thanks,

    Dhaval

    Note: You may like to click on 'Verify Answer', if this has answered your question.