File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ void usb_teardown(void);
105
105
#define DFU_MAGIC_UF2_RESET 0x57
106
106
107
107
#define DFU_DBL_RESET_MAGIC 0x5A1AD5 // SALADS
108
+ #define DFU_DBL_RESET_APP 0x4ee5677e
108
109
#define DFU_DBL_RESET_DELAY 500
109
110
#define DFU_DBL_RESET_MEM 0x20007F7C
110
111
@@ -197,9 +198,10 @@ int main(void)
197
198
_ota_dfu = _ota_dfu || ( button_pressed (BUTTON_DFU ) && button_pressed (BUTTON_FRESET ) ) ;
198
199
199
200
bool const valid_app = bootloader_app_is_valid (DFU_BANK_0_REGION_START );
201
+ bool const just_start_app = valid_app && !dfu_start && (* dbl_reset_mem ) == DFU_DBL_RESET_APP ;
200
202
201
203
// App mode: register 1st reset and DFU startup (nrf52832)
202
- if ( ! (dfu_start || !valid_app ) )
204
+ if ( ! (just_start_app || dfu_start || !valid_app ) )
203
205
{
204
206
// Register our first reset for double reset detection
205
207
(* dbl_reset_mem ) = DFU_DBL_RESET_MAGIC ;
You can’t perform that action at this time.
0 commit comments