This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 not debugging from Keil after DFU

Hi,

I am having some issues with DFU and Keil.

I am loading Softdevice s140 v7.0.1 via nRF Connect and then programming a secure BLE bootloader using nrfjprog.

The bootloader works fine and I am able to perform a DFU with no problems.

However, if I then program an updated application using Keil, the MCU jumps straight to the bootloader after programming and will not run the new application. This also means that I cannot debug. Previously I have had no issues doing this (I have always had to program the first application revision over DFU but after that it can always be done with Keil).

My guess the issue is with my IROM and IRAM settings which I have attached below. However, I may be barking up the wrong tree!

Application Memory Settings:

Bootloader Memory Settings:

Any thoughts would be much appreciated.

Thanks!

  • Hi, 

    if I then program an updated application

    What is the updated application different from the previous? Is a new service added to the application?

     

    the MCU jumps straight to the bootloader after programming and will not run the new application.

     Could you provide the log?

    -Amanda H.

  • Hi Amanda,

    What is the updated application different from the previous? Is a new service added to the application?

    No, the only difference is some different RTT Viewer printf's to distinguish between the two.

     Could you provide the log?

    How do I get this log? I can tell it is in the bootloader because I have a certain LED pattern in the bootloader that is not in my main application.

    Thanks,

    Ben

  • Hi Ben, 

    Could RTT log work before the application modified?

     

    RPDben said:
    How do I get this log?

     You could use the bootloader_secure_ble_debug image under <nRF5_SDK>\examples\dfu\secure_dfu_test_images\ble\nrf52840

    In the application project, you could enable RTT log in the sdk_configh.h as

    //==========================================================
    // <e> NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
    //==========================================================
    #ifndef NRF_LOG_BACKEND_RTT_ENABLED
    #define NRF_LOG_BACKEND_RTT_ENABLED 1
    #endif

    -Amanda H.

Related