Skip to content
Snippets Groups Projects
Commit b184b614 authored by Simon Laube's avatar Simon Laube Committed by Lorenz Meier
Browse files

IO: fix px4io uploader to work reliably on F7 platform.

- Missing get_sync() in verify function
- Allow some time to reboot before closing the serial port
  (closing the serial port drives TX low)
parent 53249c53
No related branches found
No related tags found
No related merge requests found
......@@ -645,6 +645,13 @@ PX4IO_Uploader::verify_rev3(size_t fw_size_local)
return ret;
}
ret = get_sync();
if (ret != OK) {
log("did not receive CRC checksum");
return ret;
}
/* compare the CRC sum from the IO with the one calculated */
if (sum != crc) {
log("CRC wrong: received: %d, expected: %d", crc, sum);
......@@ -657,11 +664,19 @@ PX4IO_Uploader::verify_rev3(size_t fw_size_local)
int
PX4IO_Uploader::reboot()
{
int ret;
send(PROTO_REBOOT);
up_udelay(100 * 1000); // Ensure the farend is in wait for char.
send(PROTO_EOC);
return OK;
ret = get_sync();
if (ret == OK) {
up_udelay(10 * 1000); // Ensure that we do not close UART too soon
}
return ret;
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment