Bootloader & DFU
本頁內容尚未翻譯。
Bootloader v.s. DFU
Section titled “Bootloader v.s. DFU”A Bootloader is a special program that determines the main application to run on an MCU’s startup and may also handle secure boot.
DFU (Device Firmware Update) is a method for updating an MCU’s firmware without the need for a dedicated programmer, such as an ST-Link or J-Link.
Typically, a bootloader includes DFU functionality, for example, holding a specific button during power-up can force the MCU into DFU mode, allowing firmware updates via USB or BLE OTA.
Although a bootloader and DFU are not exactly the same, and the bootloader may not always have DFU functionality, they are often used interchangeably, so in many cases DFU mode and bootloader mode can be considered the same thing.
Some MCUs come with a built-in bootloader/DFU — for example, the RP2040
. These MCUs have DFU functionality right out of the factory.
Other MCUs, such as the nRF52840
, do not have a built-in bootloader. To use DFU on these MCUs, you first need to flash a bootloader that includes DFU, such as the Adafruit nRF52 Bootloader.
Enter DFU Mode
Section titled “Enter DFU Mode”Raspberry Pi RP2040
Section titled “Raspberry Pi RP2040”The RP2040
has built-in support for UF2 DFU functionality. You can enter DFU mode using any of the following methods:
- Connect the development board/keyboard to computer and double-tap
RESET
button. This method requires QMK firmware to be flashed and Double-tap reset enabled. - Connect the development board/keyboard to computer, holding down the
BOOT
button, toggle theRESET
button, and then release theBOOT
button. - Disconnect the USB cable of the development board/keyboard, holding down the
BOOT
button, and then release theBOOT
button after reconnected USB.
If the DFU mode is entered successfully, the development board/keyboard will appear as a USB mass storage device under the name RPI-RP2
.
Pro Micro (ATmega32U4)
Section titled “Pro Micro (ATmega32U4)”Follow these steps:
- Connect the Pro Micro with USB.
- Press
RESET
button (or connected theRST
pin toGND
) twice quickly. Pro Micro will enter DUF mode for 8 seconds.
DFU mode will only last 8 seconds, you must flashing within 8 seconds.
Note that the ATmega32U4
does not have a built-in bootloader. However, most Pro Micro boards you buy already come pre-flashed with Caterina/SparkFun bootloader.