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

  • nrf_power_gpregret_set(nrf_power_gpregret_get() & ~BOOTLOADER_DFU_START);

    im using this function sd_power_gpregret_set() only not directly writing to power->gpgret reg

  • This assert indicates that the program has tried to access on of the peripherals reserved to the Softdevice (Hardware peripherals). While debugging, please read the 'info' value as the picture below shows. This will tell us which peripheral it was.

  • But dfu code without debug is working fine.that was my doubt and by adding these lines

    sd_power_gpregret_clr(0, 0xffffffff);
    sd_power_gpregret_set(0, ~BOOTLOADER_DFU_START);

    NVIC_SystemReset();

    it is working fine instead of this

    nrf_power_gpregret_set(nrf_power_gpregret_get() & ~BOOTLOADER_DFU_START);

    NVIC_SystemReset();

    i think when enabling debug is making the issue

  • The difference between the original debug and release project is that the debug variant includes logging and more relaxed security requirements (with regards to version validation), and that doesn't explain the INVALID MEMORY ACCESS assertion.

  • thanks for your response vidar.i have one more doubt that when enable the debug in bootloader i cant get logging from application code.with out enabling debug im getting log from application code

    ie.

    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> <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 0xFE000.
    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]: 0x10
    00>

    up to this im getting log but after this switching to app log is not coming from application

Related