Hi all:
I use the softdevice 2.0.0 and compile bootloader example with "dual bank" on the nrf52 DK,
Running a system that can using DFU from app then jump to bootloader as example hrm did.
After I have a deep study it, I found out that:
-
DFU will sign a value "BOOTLOADER_DFU_START" into "GPREGRET".
-
it will restart using "bootloader_util_app_start(NRF_UICR->NRFFW[0]);" into bootloader.
-
While into bootloader, the main function will check the sign on "GPREGRET"(bool app_reset = (NRF_POWER->GPREGRET == BOOTLOADER_DFU_START);)
-
The DFU flow just as the picture below.
-
And the problem is: it will stuck at dfu_ble_svc_peer_data_set(&m_peer_data); --> dfu_app_handler.c line 110
-
the nrftool DFU on my iPhone will show:
-
If I mark the step 5. line 110, and it will went to the function: "bootloader_util_app_start(NRF_UICR->NRFFW[0]);", but nrftool app on my iPhone still show "Enabling DFU Bootloader"
I think that did not really jump into bootloader, but why? What should I check?
Please correct me if I misunderstanding the DFU flow.
Thx for everyone willing to help me solve this problem.
Update 2016/06/27:
There're no return error code after that break point:
err_code = dfu_ble_svc_peer_data_set(&m_peer_data);
and the variable m_peer_data is: