Skip to content

Commit b40eb25

Browse files
tormodvoldenMarti Bolivar
authored andcommitted
Reduce poll timeout after page flash from 511 ms to 32 ms
32 ms is the value used in ST's DFU IAP example for STM32. For DFU-compliant programming tools like dfu-util this change should speed up flashing more than ten times. Signed-off-by: Tormod Volden <[email protected]>
1 parent 3f099ff commit b40eb25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dfu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ bool dfuUpdateByRequest(void) {
119119
if (userFlash) {
120120
if (code_copy_lock==WAIT) {
121121
code_copy_lock=BEGINNING;
122-
dfuAppStatus.bwPollTimeout0 = 0xFF; /* is this enough? */
123-
dfuAppStatus.bwPollTimeout1 = 0x01; /* is this enough? */
122+
dfuAppStatus.bwPollTimeout0 = 0x20; /* 32 ms */
123+
dfuAppStatus.bwPollTimeout1 = 0x00;
124124
dfuAppStatus.bState=dfuDNBUSY;
125125

126126
} else if (code_copy_lock==BEGINNING) {

0 commit comments

Comments
 (0)