DA16600 firmware download

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

Parents
  • 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; 

    We can also share the full source code with you. It is based on C#.

    Best Regards,
    OV_Renesas

Reply
  • 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; 

    We can also share the full source code with you. It is based on C#.

    Best Regards,
    OV_Renesas

Children