2 posts / 0 new
Last post
dhirajp15
Offline
Last seen:2 years 1 month ago
加入:2016-06-08 15:26
Writing payload to spi flash using SPOTA service

Hi Dialog,
I want to write data to spi flash using SPOTA service. Currently two images are stored in flash and there is free space available arround SPI flash offset 0x1f000.I want to write a 16 byte value to this location .I am doing folllowing steps :
write data in byte array format to following uuids as:
SPOTA_MEM_DEV_UUID-----> 0x00ff0103
SPOTA_GPIO_MAP_UUID------> 0x20232924
SPOTA_GPIO_MAP_UUID------> 0x20232924
SPOTA_PATCH_LEN_UUID -----> 0x0800
x31323 SPOTA_PATCH_DATA_UUID——> 033435363738
I can found it written to memory address 0x00ff00 instead of 0x01ff00 .Also looking at the code :
spota_state.mem_base_add = mem_dev & SPOTAR_READ_MEM_BASE_ADD; in app_spotar_read_mem function
#define SPOTAR_READ_MEM_BASE_ADD 0x0000FFFF in app_spotar.h
Indicates that memory base address is fetch from only first two bytes but AN_003 says that its first 3 bytes . Whats the exact way to write a patch on spi flash with base address more than 2 bytes?

Regards,
Dhiraj

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

Please be aware that the forum that you ve posted your question is the Chinese version of the forum. As far as i can understand you are interested for the SPOTAR functionallity (not the SUOTA change one of the two entire images), unfortunatelly this is no longer supported for quite some time, so there is no available example for this, i can see what you are mentioning regarding the address of the selected memory, i suppose that when this was used there was no need for accessing an address of a flash more than 64K address that why that mask exists, apparently this was designed mostly for patching in the sysram and not that much on the flash. You can try set the mask for filtering the one extra byte, but please be aware that the spotar scheme is no longer supported.

Thanks MT_dialog