The Bluefruit nRF52 Feather includes a customized version of the Nordic bootloader that enables serial support, over the air (OTA) DFU support, and various fail safe features like factory reset when the FRST pin is grounded at startup.
The bootloader that all Bluefruit nRF52 Feathers ships with allows you to flash user sketches to the nRF52832 using only the CP2104 USB to serial adapter populated on the board.
The Bluefruit nRF52 Feather is designed to briefly enter serial bootloader mode for a short delay every time the device comes out of reset, and the DTR line on the CP2104 USB to Serial adapter will trigger a reset every time the Serial Monitor is opened. This means that you can normally flash a user sketch to the nRF52 with no manual intervention on your part at a HW level.
If you need to force the serial bootloader mode, however, you can connect the DFU pin to GND at startup, which will force you to enter serial bootloader mode and stay in that mode until you reset or power cycle the board.
This can be used to recover bricked boards where a bad user sketch has been uploaded, since you will enter serial bootloader mode without executing the user sketch, and you can flash a new sketch directly from the Arduino IDE.
The Bluefruit nRF52 Feather has an optional FRST pad on the bottom of the PCB.
If you brick your device, you can solder a wire to the FRST pad, connecting it to GND. When a GND state is detected at power up the following actions will be performed:
- The user application flash section will be erased
- The user 'App Data' section that stores non volatile config data will be erased
This will cause the device to enter serial bootloader mode at startup, and the user sketch or config data that caused the device to stop responding should be removed.
While this is only recommended for advanced users, you can also force OTA (Over The Air) DFU bootloader mode to enable OTA updates using BLE and Nordic's proprietary update protocol (which is support by both Nordic mobile apps, and out own Bluefruit LE Connect).
To force OTA DFU mode, set both FRST and DFU to GND at startup. Power cycling the board will cause the device to boot up into OTA DFU mode.
The Adafruit Feather nRF52 Bootloader binary contains not only the DFU code, but also the Bluetooth stack (a.k.a SoftDevice) to make sure they work together reliably. To get the latest and greatest features from the stack such as Bluetooth 5.0 with higher throughput, increased broadcast capacities or larger MTU it is necessary to upgrade Bootloader to get the latest stack.
Luckily the Bluefruit nRF52 Bootloader can be upgraded/downgraded without any additional hardware, and we can even do that right in Arduino IDE without at risk of typos or common user errors.
First select the Bootloader version that you want to upgrade under Tools->Bootloader. Then select "Bootloader DFU for Bluefruit nRF52" for Tools->Programmer
Select Tools->Burn Bootloader to start the upgrade. After receiving the new Bootloader over the serial connection, the old Bootloader will erase itself! The new bootloader will then be flashed. The process typically takes 30-60 seconds to complete. Make sure you see the "Device programmed" in the output log before launching Serial monitor or uploadinga new sketch.