mirror of
https://github.com/pine64/blisp.git
synced 2024-12-22 06:20:12 +00:00
Fix handshake procedure :
- set RST and P8 low - wait - set P8 high - wait - set RST high Also, do not reset again when sending the 2nd handshake.
This commit is contained in:
parent
6e036df085
commit
48ecd90f71
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user