diff --git a/bootloader.c b/bootloader.c index 7a47a96..e322f40 100644 --- a/bootloader.c +++ b/bootloader.c @@ -44,6 +44,8 @@ void main(void) __dfu_magic[1] = 0; __dfu_magic[2] = 0; __dfu_magic[3] = 0; + } else if (0 == (RCC_CSR & 0xfc000000)) { // no reset flag present -> this was a soft reset using scb_reset_core() after clearing the flags using RCC_CSR_RMVF, this was the legacy way to start the DFU mode + dfu_force = true; } else { // check if the force DFU mode input is set // disable SWJ pin to use as GPIO #if (GPIO(B) == GPIO_PORT(DFU_FORCE_PIN)) && (GPIO(4) == GPIO_PIN(DFU_FORCE_PIN))