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.

Notify errors in off chip OAD



Hi

Am working on off chip oad which is working fine I can able to download the new image using the downloader and can able to store the image in external flash.

And after downloading bim will check the meta data and load the corresponding new image on to the internal flash

My question is on handling error cases like if large image or crc mismatch happen in between when bim loading firmware on to the external flash

Is there any ble profile in order to notify these errors like crc mismatch,large image, same image while doing OAD off chip? ??

I want to identify these type of errors and notify these errors to the mobile using profile or any type of notification in the application side? ??

How this type of errors are handled in oad process???

Please suggest any way or answer will be appreciated

Thanks in advance! !!!!

  • Hi Naveen,

    There are several checks that happen throughout the OAD process:

    1. Before downloading, the version and size of images are checked
      1. images that have too many blocks or zero blocks will be rejected
      2. images that do not have a higher version than the currently running image will be rejected
        1. exception is that images of version 0 will always be accepted
      3. Rejection comes in the form of the current image's metadata being sent back to the downloader so it is aware of what is currently running
    2. After downloading the CRC check is performed
      1. If this check fails the OAD will fail silently. The current app will keep running the device will never jump to bootloader. The DL can be re-attempted at any time
      2. Note that in our future release the sample app will be updated to notify the OAD downloader that a CRC error occurred. Of course, you can modify your sample app to do this. You would simply need to send a notification if the checkDL() call on line 631 of oad.c fails
    3. Assuming the CRC above succeed control will then jump to BIM (app resets)
      1. The CRC of the image will again be check once it is copied from external to internal flash. This will also fail silently because the BLE stack is not running at this point, however the next time the device boots it should check all images in ext flash and try to copy to int flash again which will hopefully succeed. Optionally a factory image can be loaded.