Unable to update using SUOTA

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
Jesus805
Offline
Last seen:1 year 10 months ago
Joined:2019-01-08 00:50
Unable to update using SUOTA

Hello,

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
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...
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[0] 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?

Device:
PM_Dialog
Offline
Last seen:3 days 20 hours ago
Staff
Joined:2018-02-08 11:03
Hi Jesus805,

Hi Jesus805,

If you get this kind of code that means that the product header is corrupted, the SUOTA expects to read from the product header the location of the images, before doing that it checks the product header signature, which is 0x70 and 0x52 from position 0x1F000, if the product header doesn't match the signature bytes I have mentioned then the application returns the “Invalid product header” message. could you please tell if you get the same message when you try SUOTA with another example of the SDK? For example, if you try it into the prox_reporter example of the SDK, you get this error? Please find a useful past forum thread for his issue:

https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-tools/suota-android-app

Thanks, PM_Dialog

Jesus805
Offline
Last seen:1 year 10 months ago
Joined:2019-01-08 00:50
Hello,

Hello, thanks for the reply,

Yes, I also get an "invalid product header" when also using "prox_reporter" in the SDK.
I did not modify this project with a few exceptions:
I changed DA14580_SW_VERSION for the second hex (fw_2.hex)
I changed the device advertisement name (USER_DEVICE_NAME in user_config.h) for the second hex (fw_2.hex)

I also mentioned in my previous post that I was able to verify using Smart Snippets that 0x70 and 0x52 are at position 0x1F000
Attached is a screenshot

Attachment:
PM_Dialog
Offline
Last seen:3 days 20 hours ago
Staff
Joined:2018-02-08 11:03
Hi Jesus805,

Hi Jesus805,

The most possible reason could be that the data returned from the flash are not proper. What you can do to verify that is to prepare a multipart image with same images and run the same fw via keil, then place a breakpoint in the app_spotar.c file in the app_read_image_headers() function . So while the device is running and is connected to the SUOTA phone application hit the update button. Then the firmware should hit the breakpoint and you can check what is the value that the device reads when accessing the flash for getting product header data, if the data are improper the firmware should return SPOTAR_INVAL_PRODUCT_HDR.

Thanks, PM_Dialog

Jesus805
Offline
Last seen:1 year 10 months ago
Joined:2019-01-08 00:50
Thank you for the reply,

Thank you for the reply,

I've already tried this (please refer to my original question). I'm getting C8 00 as the signature even though the address that SPI is reading from 0x1F000. I'm wondering why this is happening and what I can do to fix this

PM_Dialog
Offline
Last seen:3 days 20 hours ago
Staff
Joined:2018-02-08 11:03
Hi Jesus805,

Hi Jesus805,

我想这可能是硬件问题,你get invalid data from the SPI Flash. Could you please try to probe the SPI lines? Do you have any of our development boards or you have designed a custom board with DA14580 chip? Also, I would suggest you to run the spi_flash example which is under projects\target_apps\peripheral_examples\spi\spi_flash SDK path in order to make sure that the SPI Flash working correctly.

Thanks, PM_Dialog