Skip to content

Commit 08be9fc

Browse files
committed
firmware: Only execute reboot after status stage of DFU_DETACH
This way the host receives confirmation that the request was accepted and dfu-util doesn't print an error/warning. Signed-off-by: Sylvain Munaut <[email protected]>
1 parent 11e1194 commit 08be9fc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

firmware/main.S

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,15 @@ _task0_h_msos20:
370370

371371
/* DFU_DETACH (only required request for runtime mode) */
372372
_task0_h_dfu_detach:
373-
// FIXME wait for response being sent ?
373+
// No data, but we have a completion handler
374+
jal x19, _task0_resp_nodata
375+
376+
// Trigger reboots
374377
li x8, 0x1000
375378
sw zero, 0(x8)
376-
j _task0_resp_nodata
377-
378-
379-
380379

380+
// Done
381+
j _task0_loop
381382

382383

383384
/*

0 commit comments

Comments
 (0)