ETP 522 The Bootloader Commands & Packets

Revision for “ETP 522 The Bootloader Commands & Packets” created on November 30, 2015 @ 20:21:30

Title
ETP 522 The Bootloader Commands & Packets
Content
Date:<strong> 9/22/2015</strong> <h3><strong>1. </strong><strong>PURPOSE</strong><strong> / DESCRIPTION</strong></h3> <ul> <li>Knowing how to build new commands and packets for bootloader</li> <li>Introduce the commands which are used currently</li> </ul> <h3><strong>2. </strong><strong>TEST SET-UP</strong></h3> Marc Basic bootloader firmware (<a href="https://github.com/TechJect/TJ_BOOTLOADER">https://github.com/TechJect/TJ_BOOTLOADER</a>) <h3><strong>3. </strong><strong>PROCEDURE</strong></h3> <ul> <li>The existing commands for bootloader: <ul> <li>SDConnectToBootloaderCmdID (0x55) <ul> <li>Client APP should send this command before flash to reset everything on Marc</li> <li>Client APP should keep the sequence number updated</li> </ul> </li> <li>SDBootloaderDataCmdID (0x56) <ul> <li>Client APP should keep the sequence number updated</li> <li>Client APP should put the flash data into the payload field.</li> <li>Process only if last packet is (<strong><em>ProcessedPacket</em></strong> = 1)</li> <li>If the last packet failed (<strong><em>IncorrectSentinel</em></strong> = 1), then the transmission stalled until the Response field is 1 à the SDP_Build_Bootloader_Packet() is called, and update the status <strong><em>IncorrectSentinel </em></strong>and <strong><em>ProcessedPacket</em></strong> to struct <strong><em>SDBootloaderPacket </em></strong>which is defined in SDCommands.h.</li> <li>You can refer to the readme file on <a href="https://github.com/TechJect/Selfi-Drone-Flight-Control">https://github.com/TechJect/Selfi-Drone-Flight-Control</a> for the packet structure</li> </ul> </li> <li>SDResetToBootloaderCmdID (0x60) <ul> <li>It will make the system reboot from auxiliary memory ( starts from 0x7FC000)</li> <li>It’s also used in flight control firmware</li> </ul> </li> <li>SDGetVersionString <ul> <li>It’s also used in flight control firmware</li> <li>Please see the details in ETP 523</li> </ul> </li> </ul> </li> <li>To create a new command, one needs to declare the CID (like 3.1.x), and add corresponding behavior in <strong><em>SDP_Process_Command(). </em></strong>Also establish the command in Client APP</li> <li>The existing packets for bootloader: (defined in <strong><em>h</em></strong>) <ul> <li>SDBootloaderPacket: When receiving SDBootloaderDataCmdID with Respond = 1, Marc has to send this packet back to WiRa. Update the corresponding fields defined in that structure</li> <li>SDVersionPacket: Please see the details in ETP 523</li> </ul> </li> <li>To create a new packet, one needs to declare the CID (like 3.3.x), and make sure the Respond = 1 in the request command. Also update <strong><em>wrflags.response_requested</em></strong> to 1 for processing in <strong><em>SDP_Continue(). </em></strong>Make sure the Client APP also add the CID for new packet.</li> </ul> <h3><strong>4. </strong><strong>ACCEPTANCE CRITERIA</strong></h3> TBD <h3><strong>5. </strong><strong>TEST RECORDS</strong></h3> Test results shall be recorded and dated by tester. Results shall be filed and retained for 7 years.
Excerpt


OldNewDate CreatedAuthorActions
November 30, 2015 @ 20:21:30 Eric
November 30, 2015 @ 20:07:47 Eric
November 30, 2015 @ 19:50:29 Eric