This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using app_with_dfu jump to bootloader.

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:

  1. DFU will sign a value "BOOTLOADER_DFU_START" into "GPREGRET".

  2. it will restart using "bootloader_util_app_start(NRF_UICR->NRFFW[0]);" into bootloader.

  3. While into bootloader, the main function will check the sign on "GPREGRET"(bool app_reset = (NRF_POWER->GPREGRET == BOOTLOADER_DFU_START);)

  4. The DFU flow just as the picture below. image description

  5. And the problem is: it will stuck at dfu_ble_svc_peer_data_set(&m_peer_data); --> dfu_app_handler.c line 110

  6. the nrftool DFU on my iPhone will show: image description

  7. 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); image description

and the variable m_peer_data is: image description image description image description

Related