OFF CHIP OTA UPDATE using external flash

I am working on this project off chip ota update on nRF5_SDK  using ecample/thread/dfu

by now, i have done changes in these functions on_data_obj_create_request() and on_data_obj_write_request(). initially these functions were erasing and writing data in internal flash which I changed to qspi functions like nrf_drv_qspi_erase() and nrf_drv_qspi_write(). and it works perfectly.

Later i changed functions for hash verification which is also working but i am not sure about what should be the next step so that bootloader changes the earlier application with the new firmware image.

  • Is there a way to erase the trigger settings or the settings saved for the currently downloading firmware? Because once the above error occurs, my firmware process works. However, alternatively, if it works fine this time, then the next time there might be an error. Or, if there's an error this time, it might work the next time.

    I think some type of setting or data is stored in the system that isn't erased when something fails

  • The occasional CRC failure occurred due to the 'rest_block' variable stemming from the 'FIRMWARE_BLOCK_SIZE,' which is set to 4096. Therefore, whenever the 'rest_block' size exceeded 256, this error occurred.

    // CRC verification on external image

    uint16_t firmware_blocks = image_size / FIRMWARE_BLOCK_SIZE;

    uint8_t rest_block = image_size % FIRMWARE_BLOCK_SIZE;

    uint32_t computed_crc = 0;

    As this problem has been solved, my task is now completed. Thank you so much!

Related