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

dfu problem

Hello,

I'm realizing dfu.

  1. 1st case - for test NRF_LOG_PRINTF("main start\r\n"); // ******* main loop start ******* // while (1) { enterBootloader();

     }
    

Dfu works well.

  1. 2nd case - question I call enterBootloader(); in some function. I can see jumping to the enterBootloader(). But, I can't see my device in nrfToolBox.

  2. question : Application doesn't restart automatically after dfu done successfully.

  • I use sd130/sdk12.1.0. and experimental_ble_app_buttonless_dfu.

image description

thanks.

Parents
  • What is that "doing other work" ? Please send your code snippet.

    I noticed that in your enterBootloader() code you triggered a reset right after nrf_dfu_settings_write(). This maybe not a good idea. Because nrf_dfu_settings_write() is not a blocking function. The flash is not written right after the call, but you need to wait for the call back before you can trigger the reset.

    What we did in flash_callback() is to try to disconnect after we have a flash call back. Then after that we trigger the reset.

    Again, I suggest you to test with unmodified dfu bootloader and unmodified experimental_ble_app_buttonless_dfu example.

Reply
  • What is that "doing other work" ? Please send your code snippet.

    I noticed that in your enterBootloader() code you triggered a reset right after nrf_dfu_settings_write(). This maybe not a good idea. Because nrf_dfu_settings_write() is not a blocking function. The flash is not written right after the call, but you need to wait for the call back before you can trigger the reset.

    What we did in flash_callback() is to try to disconnect after we have a flash call back. Then after that we trigger the reset.

    Again, I suggest you to test with unmodified dfu bootloader and unmodified experimental_ble_app_buttonless_dfu example.

Children
No Data
Related