Wait before sending the firmware data
Without the small delay, sending the first frame often fails. Trying to read the ACK response byte just fails with a timeout, and no data is received at all. The bootloader is probably not ready to receive data yet.
This commit is contained in:
parent
0239329f06
commit
939470df52
@ -903,6 +903,9 @@ divesystem_idive_device_fwupdate (dc_device_t *abstract, const char *filename)
|
|||||||
goto error_free;
|
goto error_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait before sending the firmware data.
|
||||||
|
dc_iostream_sleep (device->iostream, 100);
|
||||||
|
|
||||||
// Upload the firmware.
|
// Upload the firmware.
|
||||||
unsigned int offset = 0;
|
unsigned int offset = 0;
|
||||||
while (offset + 2 <= size) {
|
while (offset + 2 <= size) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user