This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

when set NRF_LOG_DEFAULT_LEVEL as 1 in sdk_config.h, OTA failed

I am using nRF52840 development software based on ble_app_uart_c, and I found that when I set NRF_LOG_DEFAULT_LEVEL as 1, if I download the software by Segger, the device worked well.  If I updated the software by OTA, the devcie cannot start.  If I set NRF_LOG_DEFAULT_LEVEL  as 3, updating the software by OTA, the device worked well.

  • Hi Cynthia, 
    Could you provide us the userbootloader code that we can test here ? 

    Could you please clarify: 

    - If you only change the advertising name (nothing else) the original bootloader works ? 

    - If you add a timer in nrf_bootloader_dfu_timers the bootloader stopped working ? 

    If it's the case please provide the code you added to the nrf_bootloader_dfu_timers ()

    Have you tried to step in the code in image_copy() and checked what's wrong ? 

  • Hi Hung,

    - I changed orginal bootloader's advertising name and NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED's value as 0 , It works .

    -  I added app timer based on original bootloader. I  changed nrf_bootloader.c and nrf_bootloader_dfu_timers.c as shown in attachment. 

    If I remove the external watchdog from the board, I dfu the app with user bootloader,It works. It seems also  have to do something with the external watchdog.

  • Hi Cynthia,

    I noticed that the WDT timeout is 100ms (?). This might be too short because the time to erase one page is 85ms. You may want to do a WDT feed right before the image_copy() is called. 

    Could you do a test by only doing LED blinking in your user timer handler ? So there is no WDT related activity and simply adding one extra timer. If this also crash, I can try to test here to reproduce and figure out what's wrong. 

    Have you tried to use the internal WDT ? Is the external WDT an obligation for your application ? 

  • Hi Cynthia, 

    Please let us know if you still have issue with the external WDT. 

Related