I have been testing unbounded buttonless DFU with BL652 using SDK 15.0 and SDK15.2 and I kept getting Error 8(0x8): GATT CONN TIMEOUT after bootloader is entered.I traced back the problem: The device restarts itself after NVIC_SystemReset() in shutdown_process() is called. I am using Android phone and latest version of NRF Connect.
The buttonless Secure_Bootloader_BLE is tested to be working on its own. I followed the procedures to generate the setting and merge with bootloader. The things I modified are:
1. The software device clock source changing them to RC source with CTIV 16 and TEMP_CTIV 2.
2. The LEDs and Buttons mapping in pca10040.
I dont know how to proceed furthur to solve this problem. If anyone can shine some lights on the issue I will greatly appreciate it.
Thank you in advance
Do you start a watchdog in your application? I ask because this is a typical reason for seeing GATT CONN TIMEOUT on the phone side after entering DFU mode. If the Watchdog was started by the application, this is not reset when doing a soft reset. And in that case, the watchdog will timeout in the bootloader unless it is fed there. If this is the case, then you can use the watchdog support that was added to the bootloader in SDK 15.
There is no watchdog in the application and NRF_BL_WDT_MAX_SCHEDULER_LATENCY_MS is set to 10000 in secure_bootloader. The issue is when NVIC_SystemReset() is issued in
if ((m_pwr_mgmt_evt == NRF_PWR_MGMT_EVT_PREPARE_RESET)
|| (m_pwr_mgmt_evt == NRF_PWR_MGMT_EVT_PREPARE_DFU))
The ble_app_buttonless_dfu example wont go into DFU mode but just restarts the application.
I do not understand why this should happen. Modifying the LED's and buttons in the board file and clock source as you wrote, should not have any effect on this, so it should work as in the example. Can you try with the debug bootloader with RTT logging, and upload the log here? It would also be useful with log from the application, logging when it gets the NRF_PWR_MGMT_EVT_PREPARE_DFU event.