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.

Parents Reply Children
  • Hi,

    The example should print out the logs over RTT. Use J-link RTT viewer to view the logs.

    regards

    Jared 

  • Hi,

    The error logs show following:

    <info> app: ATT MTU exchange completed.
    00>
    00> <info> app: Discovery complete.
    00>
    00> <info> app: Time queried. Returned: Sun Mar 05 00:07:09 2034
    00>
    00>
    00> <info> app: Time queried. Returned: Sun Mar 05 00:07:09 2034
    00>
    00>
    00> <info> app: Disconnected.
    00>
    00> <info> app: ATT MTU exchange completed.
    00>
    00> <info> app: Discovery complete.
    00>
    00> <info> app: Time queried. Returned: Sun Mar 05 00:07:29 2034
    00>
    00>
    00> <info> app: Time queried. Returned: Sun Mar 05 00:07:29 2034
    00>
    00>
    00> <info> app: Disconnected.
    00>
    00> <info> app: Disconnected.
    00>
    00> <info> app: ATT MTU exchange completed.
    00>
    00> <info> app: Discovery complete.
    00>
    00> <info> app: Time queried. Returned: Sun Mar 05 00:07:16 2034
    00>
    00> <info> app: Inside main
    00>
    00> <debug> app: In nrf_bootloader_init
    00>
    00> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    00>
    00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    00>
    00> <debug> nrf_dfu_settings: Using settings page.
    00>
    00> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    00>
    00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    00>
    00> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    00>
    00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    00>
    00> <debug> app: Enter nrf_bootloader_fw_activate
    00>
    00> <debug> app: Valid App
    00>
    00> <debug> app: Enter nrf_dfu_app_continue
    00>
    00> <error> app: Received a fault! id: 0x00004002, pc: 0x00000000, info: 0x2003FF70
    00>
    00> <info> app: Time queried. Returned: Sun Mar 05 00:07:16 2034
    00>

  • Hi,

    It seems like you're hitting an error inside app_activate(). 

    Can you use the bootloader_debug project instead? It has the hardfault library already enabled, which means that the log will be more verbose, which helps us pinpoint where the issue is.  Can you use that project and see if the log specifies exactly where it faults?

    regards

    Jared 

  • Hi Cynthia, 

    I'm taking over the case from Jared as it's more of a DFU case  . 

    Could you give me more information about your SDK version ? Also the board/IC version. Are you testing on a DK ? 

    If you try doing DFU with an unmodified bootloader do you see the same issue ? 

    Also could you you explain a little bit about the log, I can find that there are quite a lot of WDT feed before the actual activity in main. Have you made sure the WDT is fed when the bootloader started ? 

    From what I can see in the log, the assert happened inside app_activate()  , most likely inside image_copy() function. 

    I would suggest to use the _debug version of the bootloader and put a breakpoint inside app_activate() and step through the code. 

Related