According to the official tutorial must before the MCU is powered on hold button 4 to enter DFU mode, detected that I how to achieve a certain GPIO port high level into DFU mode
According to the official tutorial must before the MCU is powered on hold button 4 to enter DFU mode, detected that I how to achieve a certain GPIO port high level into DFU mode
Hi,
The default bootloader enters DFU mode if you press and hold button 4 when powering the device.
The bootloader code is found in the SDK, under <sdk folder>\examples\dfu\bootloader
. To change what pin to use for entering DFU mode, you can change the define of BOOTLOADER_BUTTON
in main.c to the pin that you want to use.
The preferred way to do this is to use the correct preprocessor define (in project options) for the board that you use. This may be for instance BOARD_PCA10028 for the nRF51 DK or BOARD_CUSTOM for a custom board. Make sure that BSP_BUTTON_3 is defined in the corresponding board file (i.e. pca10028.h or custom_board.h for the previous examples). The board files are located in the folder <sdk folder>\examples\bsp
.
Regards, Terje