I am trying to implement SUOTA using the tutorial "Dialog SDK 5 Training Materials –SUOTA (Software Update Over The Air)" on SDK 5.0.4. I'm using "ble_app_ota" in the "ble_examples" folder (with some user configuration modifications). I am able to successfully build a "fw_multi_part_spi.bin" and burn it to SPI flash memory. When I try updating using the SUOTA app with an android, I get an "invalid product header" error.
Following this thread
Here's the following things I was able to verify:
Using a hex viewer and Smartsnippets Toolbox, I was able to verify that the product header signature (70 52) was indeed in offset 0x1F000 of fw_multi_part_spi.bin.
Using Smartsnippets Toolbox, I was able to verify that the product header signature (70 52) was in offset 0x1F000 in the DA14580's SPI flash.
I then tried debugging "app_read_image_headers" to see what signature I was receiving and lo and behold I was getting (C8 00) as the signature. I dug deeper into app_read_ext_mem -> spi_flash_read_data and saw that even though the address parameter was 0x1F000, rd_data_ptr was 0xC8. It seems that I'm dealing with some sort of data corruption, is there any suggestions I can follow to find a solution?