Hello,
We are using nRF5 SDK14.2.0 and soft device s132, and trying to perform DFU of the Bootloader itself.
The process fail in nrf_dfu_postvalidate() due to wrong HASH value calculated on the image written to the flash.
We read the content of the Flash after the DFU process that failed, starting from address 0x23000 with length of the image, and saved it to a binary file. After comparing it with the binary image file inside the zip package, we find them identical, hence the write of the image is done correctly!
Yet we are puzzled that the Hash calculated in the post-validation function get different 32 bytes value when comparing it to the data in the init packet.
Some comments:
1. This discrepancy happen only when trying to do DFU to Bootloader, we don't get this problem when DFU an application firmware!
2. When manually padding with 0xFF the Bootloader FW image and make its size aligned 128 bytes, we can complete the Bootloader FW DFU successfully.
Does anyone know how to solve this Hash calculation discrepancy without padding the FW image?
Does anyone have a clue to the source of the discrepancy?