Hello,
I am using DA16600 for my project. I want to develop a system to update the DA16600 firmware on-field.
I referred the documentation and implemented Y-Modem protocol. Everything works fine, except for the last packet.
According the the protocol used, packet size is 1024 bytes. there will be a case where, the last packet will be smaller and padding has to be done. In my code, padding is done with '\0' byte, but when same firmware is downloaded with multidownloader tool, padding bytes are different. please refer the attached file [time marker '0' marks the end of firmware file and the rest are padding bytes].
7534.refer.zip
folder contains 3 files;
1. CP145_WIFI_RTOS.img [firmware image used, this is RTOS image renamed manually]
2. fw_update_manual.sal [this is a capture of programming the DA16600 using my MCU]
3. fw_update_multidownloader.sal [this is a capture of programming the DA16600 using multidownloader tool]
how to generate these padding bytes ? can you direct me to a documentation mentioning this ?
Thank you.
Kind regards,
synd223
Hi Synd,
Thank you for posting your questions online.
We will look into this and back to you as soon as possible.
BR,
JH_Renesas
Could you check on the freertos-sdk-programmer-guide section 15:
UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide
Hi JH_Renesas,
I read the documentation 'UM-WI-046', but I do not see a reference to the question I raised, it contains information about OTA firmware updates. I can confirm that the OTA updates are working fine, but my primary concern is with programming the DA16600 using debug lines using the Y-Modem protocol.
I am following the procedure used by the multidownloader tool, everything is correct except the ending part. The last packet contains some unknown characters [padding bytes] when programmed using multidownloader tool,
I want to know if there is some syntax being followed or just some random bytes!! Is there any method to generate these bytes ? can I use null characters instead ?
The main reason for raising this issue is because these bytes are same everytime I program using the tool, and with a different firmware the padding bytes are different.
Please give me more information regarding this concern.
Regards,
Hi Synd223.Thank you for the reply.Apologies for the delay. Let me check on this with the Wi-Fi Support Team and I will get back to you as soon as possible.Best Regards,Orestis
Hi Synd223,Apologies for the delay.Unfortunately, there is no special document about Y-Modem.Please find attached a code snippet of the multidownloader tool.The main function for packetizing is makePacketAndSend which is called from DownloadImage.Regardless of size, the packet size is 1024+5, CRC is located at the same location.The last packet must have the same shape.
//innerData = Enumerable.Repeat((byte)26, 1024).ToArray(); Buffer.BlockCopy(fData, fDataOffset, innerData, 0, size); packet[0] = 0x02; //long packet Buffer.BlockCopy(innerData, 0, packet, 3, 1024); crc = CRC16(innerData, 1024); packet[1024 + 5 - 2] = (byte)(crc >> 8); packet[1024 + 5 - 1] = (byte)(crc); packetLen = 1024 + 5;
Hi OV_Renesas,
Thank you for the clarification.
Please correct me if I am wrong.
As you mentioned, the last packet should have the same shape as the previous ones [as per the Y-Modem protocol],
I am assuming the padding [extra bytes] will not matter and can be null characters. is this correct ?Best Regards,
HI Synd223.Thank you for the reply.
synd223 said:I am assuming the padding [extra bytes] will not matter and can be null characters. is this correct ?
That's right. The padding at last packet does not matter and can be null character. When image is loaded from flash, only actual image(the size is in the header of image) is loaded. Best Regards,OV_Renesas
Thank you so much for the clarification.
Best Regards,
synd223.