diff --git a/lib/blisp.c b/lib/blisp.c index 994a18f..c64cc05 100644 --- a/lib/blisp.c +++ b/lib/blisp.c @@ -143,9 +143,9 @@ blisp_device_handshake(struct blisp_device* device, bool in_ef_loader) { sp_set_rts(serial_port, SP_RTS_ON); sp_set_dtr(serial_port, SP_DTR_ON); sleep_ms(50); - sp_set_rts(serial_port, SP_RTS_OFF); - sleep_ms(100); sp_set_dtr(serial_port, SP_DTR_OFF); + sleep_ms(100); + sp_set_rts(serial_port, SP_RTS_OFF); } uint32_t bytes_count = device->chip->handshake_byte_multiplier * (float)device->current_baud_rate / 10.0f; diff --git a/tools/blisp/src/cmd/write.c b/tools/blisp/src/cmd/write.c index 51471ea..98ee249 100644 --- a/tools/blisp/src/cmd/write.c +++ b/tools/blisp/src/cmd/write.c @@ -318,7 +318,7 @@ void blisp_flash_firmware() { } printf("Sending a handshake..."); - ret = blisp_device_handshake(&device, false); + ret = blisp_device_handshake(&device, true); if (ret != 0) { fprintf(stderr, "\nFailed to handshake with device.\n"); goto exit1;