How to enable logging in Ble secure DFU example pca10056

Dear nordic team,

                            i want to take log from dfu example i tried using rtt veiwer but it doesnt work.im using sdk version 17.0.2 and soft device 7.2.0 and nrf52840 DK

in nrf drivers/ folder there is no uart related files do we need this for taking logs.pls help

  • i also having error when  calling

    nrf_power_gpregret_set(nrf_power_gpregret_get() & ~BOOTLOADER_DFU_START);

    <error> app: Received a fault! id: 0x00001001, pc: 0x0000F4D2C, info: 0x00000001

  • after adding this it is giving me

    00> <debug> app: DFU mode requested via GPREGRET.
    00>
    00> <info> nrf_bootloader_wdt: WDT is not enabled
    00>
    00> <info> app: Entered gpio init
    00>
    00> <debug> app: in weak nrf_dfu_init_user
    00>
    00> <debug> app: timer_stop (0x20005994)
    00>
    00> <debug> app: timer_activate (0x20005994)
    00>
    00> <info> app: Entering DFU mode.
    00>
    00> <debug> app: Initializing transports (found: 1)
    00>
    00> <debug> nrf_dfu_ble: Initializing BLE DFU transport
    00>
    00> <debug> nrf_dfu_ble: Setting up vector table: 0x000F1000
    00>
    00> <debug> nrf_dfu_ble: Enabling SoftDevice.
    00>
    00> <debug> nrf_dfu_ble: Configuring BLE stack.
    00>
    00> <debug> nrf_dfu_ble: Enabling the BLE stack.
    00>
    00> <debug> nrf_dfu_ble: No advertising name found
    00>
    00> <debug> nrf_dfu_ble: Using default advertising name
    00>
    00> <debug> nrf_dfu_ble: Advertising...
    00>
    00> <debug> nrf_dfu_ble: BLE DFU transport initialized.
    00>
    00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
    00>
    00> <debug> app: Enter main loop
    00>
    00> <info> app: Transfer completed. Received:
    00>
    00> <info> app: 0xEE00,
    00>
    00> <info> app: 0xEF00,
    00>
    00> <info> app: 0x100,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: mac id transfer
    00>
    00> <info> app: Transfer completed. Received:
    00>
    00> <info> app: 0xEE00,
    00>
    00> <info> app: 0xEF00,
    00>
    00> <info> app: 0x2000,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: exit to app
    00>
    00> <error> app: Fatal error

    fatal error

  • You can't write directly to the POWER->GPREGRET register when the BLE transport is enabled. Instead you have to use sd_power_gpregret_set()

  • Looks like you haven't added the DEBUG flag as shown in my screenshot.

  • OK  thanks now i added everything and get error code as

    SOFTDEVICE: INVALID MEMORY ACCESS

    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: 0x0,
    00>
    00> <info> app: exit to app
    00>
    00> <error> app: SOFTDEVICE: INVALID MEMORY ACCESS

Related