Hi,
We are developping an app using nrf52840. We started with the SDK14.2 and needed to migrate to SDK15.0 in order to use the long range. We are also using a Bootloader and DFU in order to update the app Over The Air.
The app was migrated successfully and everything works as expected. The problem is with the bootloader project. Since the project was pretty empty we copied directly the secure bootloader ble exemple from the SDK15.0. After adjusting the flash and ram placements the bootloader project worked - as in: it started the main app. When our app activates DFU and performs a NVIC_SystemReset(); the bootloader starts, and recognize that we want to go in DFU. Everything looks ok until the bootloader reaches the function nrf_dfu_transports_init. In this function it recognizes that there is one transport and ble_stack_init() is called. The vector table is set correctly and nrf_sdh_enable_request(); is called. In this function we reach sd_softdevice_enable and then the device hangs. This functions doesn't return at all. We are then reset by the watchdog after about 90 seconds and the device does not enter DFU since it was reset and the flag has been cleared.
After reading other questions and answer on the subject I saw that the SoftDevice clock configuration in sdk_config.h was wrong, since it used the xtal crystal but there aren't any on my custom board. So I changed the setting to use these parameters:
Now when I try to enter DFU the device resets right away. I use SEGGER_RTT_PRINT to debug and since there is a little delay with the printing it is kind of hard for me to know exactly where the system resets but I'm pretty sure that it reaches sd_softdevice_enable and that it is at this point that we reset.
I also saw that the problem may be linked to the memory layout. Here is the layout of my complete merged .hex file:
And here are the settings of my bootloader project:
And of my main application project:
Best Regards