I'm currently working on a custom board based on the nRF52840, using SoftDevice S140 v7.0.1 and nRF5 SDK v16.0.1. I’ve integrated the BLE Buttonless DFU example (examples/dfu/secure_bootloader/pca10056_ble
) with my custom application code. However, I’m running into an issue that I can’t seem to debug effectively.
Problem:
The DFU process completes successfully. I get the “App had been installed” log from the secure bootloader, but after that, the application never starts advertising. The bootloader debug session also crashes after the DFU process finishes. I receive no logs from the application itself, which makes it difficult to trace the issue.
After testing, I found that the issue is triggered only when I set the following GPIOs high:
-
P0.27
-
P1.07
These pins are set using nrf_gpio_pin_set()
right before the main loop, after all application initialization is done.
When I comment out those two lines, the application starts broadcasting correctly and behaves as expected. I have also verified that the same firmware works fine without the Buttonless DFU template integration, even when setting those pins high.
Additional Context:
-
Several other pins are initialized in a similar way and cause no issues.
-
I’ve disabled all BSP initialization across the project and double-checked included headers for anything that might initialize pins implicitly.
-
During secure bootloader setup, I changed the bootloader reset pin from P0.21 to P0.03 (as P0.21 is needed elsewhere). This change caused no problems and worked as expected.
-
The board is completely custom, and all peripheral hardware has been tested.
Questions:
-
Are P0.27 or P1.07 used internally or reserved by the secure bootloader or BLE Buttonless DFU app in SDK v16.0.1?
-
Could setting these pins high during application startup affect SoftDevice operation or bootloader-to-app transition?
-
Any suggestions for how to further debug the application, especially since I get no logs from it?
I’d appreciate any advice or insight into this. Thank you!