Hi ,
DA14531 SDK VERSION :6.0.16.1144
In my application i trying to do BLE ota using SUOTA APP Renesas and trying on the example and the i defualt example i haven't changed anything other than advertisement packets.
what are the steps to be followed to do the ota with the updated bin file.
Thanks ,
Sowmiya
Hi Sowmiya,Thank you for posting your question online.
sowmiya said:what are the steps to be followed to do the ota with the updated bin file.
Please refer on the following Tutorial and Document:1)22. SUOTA Overview — DA145XX Tutorial SDK Getting started (renesas.com)2) 3. BLE Development Environment and First Application — DA14585/DA14531 SW Platform Reference Manual (renesas.com)Best Regards,OV_Renesas
As mentioned in the video followed the steps , flashed the muliti image fw to the device .
its scanning SUOTA-1 scannning in smart_bond scanner aplication .
how to do the OTA process , i have downloaded the souta application but this not scaning in SUOTA app.
how to upload the new application image file into the app.
Thanks,
JH_Renesas said:the min erase size is a block.
its above the product header so its Image 2 block size right ?
what is min erase size ?
is this will switch from image 2 to image 1 address block on every ota update.?
JH_Renesas said:Or you can store after the Production header.
How much i can store after the product header ? when i am reader my image file from 0x0001F000 to 1F018 which is 24 bytes .
but in the product document the product header format and bytes segment 0 - 64 bytes
then where i will use the next 64 bytes for my params ? how much long i can use ?
Hi Sowmiya,
there has 4K bytes from 0x1F000 to 0x20000. So, just free to use after Product Header.
Hi,
thanks for the reply ,
sowmiya said:is this will switch from image 2 to image 1 address block on every ota update.?
could you plz explain the switch happens ? and in SUOTA application selecting block size 240 means ? and also Selecting the bank : oldest and there is the option oldest ,bank 1 and bank 2
JH_Renesas said:there has 4K bytes from 0x1F000 to 0x20000. So, just free to use after Product Header.
...
One more question , i am using DA14531 , as your suggested 0x1F400 i have set this address its working when i am directly flashing a single image direct application .
and when i merged with secure bootloader to create a multi image - when i am storing in SPI flash device resets continuously.
what may b the reason for this ?
I am not sure about what you want to explain.
What does this mean.
sowmiya said:there has 4K bytes from 0x1F000 to 0x20000. So, just free to use after Product Header.
As suggested , i changed the PC_FLASH_ADR = 0x1F400 ; which is after the product header. this address is working if i flashed the single image code to device. this address is working to write and read the data from the SPI flash address,
in the same way, when i makes a multi image file , the address assigned above is not working. cant able to read and write the file. i have attached the file.
Multi f5_f1 - f6_f3.rar
If you want erase the flash again, please make sure the last 4KB are not erased. by PLT or ToolBox.
BR,
Jason
if i reading the contents of the file , the address looks upto 0x0001f010,
JH_Renesas said:If you want erase the flash again, please make sure the last 4KB are not erased. by PLT or ToolBox.
i dont want to erase the flash and i writting and reading the data in 0x1F400 this address , but its not working to write and read itself
Thanks ,Sowmiya
Try this button
I found the issue that after merging the file once SPI flash is writes and read the data , the product header gets NULL , so device restarts continuously.
i am using int8_t retb = spi_flash_block_erase(PC_FLASH_ADR, SPI_FLASH_OP_SE); function before write into the PC_FLASH_ADR address.
its erase product header also 0x0001f0000
how to erase only the PC_FLASH_ADR assingned memory only.
uint32_t PC_FLASH_ADR = 0x1F040;
static void load_config_value_inmem(void) { uint32_t actual_size; uint32_t i; arch_printf("\r\n\r\n\r\nload mem ..."); arch_printf("\r\n\r\nPerforming Sector Erase..."); int8_t retb = spi_flash_block_erase(PC_FLASH_ADR, SPI_FLASH_OP_SE); arch_printf("Sector erased %d\r\n",retb); // Write data example (512 bytes) arch_printf("\r\n\r\nPerforming byte write..."); // spi_flash_write_data(wr_data, 0, 512, &actual_size); int8_t ret = spi_flash_write_data(wr_data, PC_FLASH_ADR, SPI_READ, &actual_size); arch_printf("write ret %d\r\n",ret); // Read SPI Flash first 512 bytes arch_printf("\r\n\r\nReading SPI Flash first after write..."); int8_t ret1 = spi_flash_read_data(rd_data, PC_FLASH_ADR, SPI_READ, &actual_size); arch_printf("read ret %d\r\n",ret1); // Display Results for (i = 0; i < SPI_READ; i++) { arch_printf("%02x",rd_data[i]); arch_printf(" "); } //arch_printf("\r\nactual_size: %d",actual_size); instance_data.device_serial_num = (uint32_t)rd_data[0] << 24 | (rd_data[1] & 0xff) << 16 | (rd_data[2] & 0xff) << 8 | (rd_data[3] & 0xff); arch_printf("\r\nACTUAL SERIAL : %d",instance_data.device_serial_num); instance_data.system_off = (uint32_t)rd_data[4] << 24 | (rd_data[5] & 0xff) << 16 | (rd_data[6] & 0xff) << 8 | (rd_data[7] & 0xff); // instance_data.system_off = rd_data[4]; arch_printf("\r\nACTUAL SSYS OFF : %d ",instance_data.system_off); instance_data.adv_interval = (uint32_t)rd_data[8] << 24 | (rd_data[9] & 0xff) << 16 | (rd_data[10] & 0xff) << 8 | (rd_data[11] & 0xff); // instance_data.adv_interval = rd_data[5]; arch_printf("\r\nACTUAL ADV INT : %d ",instance_data.adv_interval); instance_data.action_timer = (uint32_t)rd_data[12] << 24 | (rd_data[13] & 0xff) << 16 | (rd_data[14] & 0xff) << 8 | (rd_data[15] & 0xff); instance_data.trigger_timer = (uint32_t)rd_data[16] << 24 | (rd_data[17] & 0xff) << 16 | (rd_data[18] & 0xff) << 8 | (rd_data[19] & 0xff); instance_data.device_type = rd_data[20]; instance_data.accel_sensiivity = rd_data[21]; instance_data.move_thrshold = rd_data[22]; instance_data.ff_thrshold = rd_data[23]; instance_data.dbm_set = rd_data[24]; spi_flash_power_down(); GPIO_Enable_HW_Reset(); }
for storing user config ,
int8_t retb = spi_flash_block_erase(PC_FLASH_ADR, SPI_FLASH_OP_SE);arch_printf("Sector erased %d\r\n",retb);
Instead of spi_flash_block_erase , now i used page erase then its working.