NRF52832 won't reset chip after dfu

won't reset chip after dfu

application:      \examples\ble_peripheral\ble_app_buttonless_dfu

bootloader:     \examples\dfu\secure_bootloader\pca10040_s132_ble_debug\arm5_no_packs

SOFTDEVICE:  S132

android  app:  nrf connect VESION 4.24.3

I have programmed  application and merged bootloader, application, soft device.

I can do dfu as many as I want,

but the problem is the MCU can not auto reset   whenever I finish dfu.

i have to    "disconnect " from the nrf connect app, then it reset

how to 

nrf log:  

00> <debug> app: Enter nrf_bootloader_fw_activate
00>
00> <info> app: No firmware to activate.
00>
00> <debug> app: App is valid
00>
00> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
00>
00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
00>
00> <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
00>
00> <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0

Parents
  • bootloader does not enable UART OR logging,

    Removing line contains NRF_LOG_FLUSH (nrf_bootloader_app_start.c:75) have no affect.

    bootloader is base on the examples without any change:

    1. nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_bootloader\pca10040_s132_ble

    2. nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_bootloader\pca10040_s132_ble_debug

    Another strange issue : no logs print out while in stage of bootloader  with  application In combination with freertos

    application:      \examples\ble_peripheral\ble_app_buttonless_dfu +freertos

    actually both  the application and dfu running well,but no logs print out while in stage of bootloader

Reply
  • bootloader does not enable UART OR logging,

    Removing line contains NRF_LOG_FLUSH (nrf_bootloader_app_start.c:75) have no affect.

    bootloader is base on the examples without any change:

    1. nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_bootloader\pca10040_s132_ble

    2. nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_bootloader\pca10040_s132_ble_debug

    Another strange issue : no logs print out while in stage of bootloader  with  application In combination with freertos

    application:      \examples\ble_peripheral\ble_app_buttonless_dfu +freertos

    actually both  the application and dfu running well,but no logs print out while in stage of bootloader

Children
  • Can you run "nrfjprog --readregs" when the device has gotten stuck in this state? I.e. after the "00> <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0" line is printed. The Program Counter (PC) should tell us exactly where it hangs.

  • here is the cmd log:

    C:\Users\Administrator>nrfjprog --readregs
    R0: 0x00025278
    R1: 0x20005548
    R2: 0x00000000
    R3: 0x00000001
    R4: 0x200000B8
    R5: 0x00000000
    R6: 0xE000E000
    R7: 0x0000002A
    R8: 0x00000000
    R9: 0x00000000
    R10: 0x00000000
    R11: 0x00000000
    R12: 0x0000000C
    SP: 0x20005548
    LR: 0x00016299
    PC: 0x00025278
    xPSR: 0x61000000
    MSP: 0x20005548
    PSP: 0x00000000

    no logs print out while in stage of bootloader  with  application In combination with freertos

    application:      \examples\ble_peripheral\ble_app_buttonless_dfu +freertos

    actually both  the application and dfu running well,but no logs print out while in stage of bootloader

    here is the rtt log:

    00> <info> app: Setting vector table to bootloader: 0x00071000
    00>
    00> <info> app: Setting vector table to main app: 0x00026000
    00>
    00> <info> app: DFU FreeRTOS example started.

    00> <info> app: Device is preparing to enter bootloader mode.
    00>
    00> <info> app: Disconnected 1 links.
    00>
    00> <info> app: Device will enter bootloader mode.

  • Hello,

    I not sure what Softdevice version you use, but based on the address range, it seems like the program is running inside the sd_app_evt_wait() idle loop. So it has not "crashed" at least.

    Can you check if the device is advertising in DFU mode?

    h.wen said:
    actually both  the application and dfu running well,but no logs print out while in stage of bootloader

    It can be tricky to get RTT logging working with both a bootloader and app running on the same device: https://devzone.nordicsemi.com/f/nordic-q-a/30310/easy-way-to-merge-bootloader-and-application-rtt-output. I would suggest to enable UART logging in the app if that's an option.

Related