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,

    How does the OTA fail when you set the NRF_LOG_DEFAULT_LEVEL to 3. Is any error codes shown in the log? 

    regards

    Jared 

  • When NRF_LOG_DEFAULT_LEVEL set as 1, the compiled app uploaded to the device by OTA, the device didn't get start. I don't know how to catch the logs.

  • 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 

Related