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

RTT viewer or Segger message: CTRL-AP indicates that the device is secured (J-Link V6.88a Info)

Working in a Windows 64 environment with nRF Connect SDK v1.5.0. Target is a custom nRF5340 board connected through a nRF5340-PDK as a debugger, via USB.

I can no longer use RTT Viewer to connect to our target: any attempt to connect pops up a message saying CTRL-AP indicates that the device is secured... Do you want to unsecure the device?

Answering YES fully erases the target. Answering NO results in denied connection.

 

The same message is popping up when trying to run the debugger directly via Segger (the debugger works, but only after it fully erased the target and reuploaded the code).

This was not happening before, but we are unsure of what was changed to cause it and how to get around.

Regards

Bruno

Parents
  • Hello,

    This was not happening before, but we are unsure of what was changed to cause it and how to get around.

    Have you changed the silicion revision since then, and are you building the project for the new revision? As you may know, revision eng. D/1 of the nrf5340 include an updated implementation of the readback protection mechanism compared to eng. revision A used on the nRF5340 PDK board. What's different is that this new mechanism  require the FW to unlock the chip on startup (taken care of by the MDK startup files if you build for the new chip) . 

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#readback-protection

    Regards,

    Vidar

     

  • Hello, 

    I hit similar problems on the network core. I can confirm that the function `nrf53_handle_approtect` is being compiled in and the following branch is taken: 

    /* Load APPROTECT soft branch from UICR.
    If UICR->APPROTECT is disabled, CTRLAP->APPROTECT will be disabled. */
    NRF_CTRLAP_NS->APPROTECT.DISABLE = NRF_UICR_NS->APPROTECT;

    However when I try to load a new binary in the network core, I am greeted with this message on JLink 7.50a (similar behavior with older JLink like 7.22):

    Selecting SWD as current target interface.
    
    Selecting 4000 kHz as target interface speed
    
    Device "NRF5340_XXAA_NET" selected.
    
    
    Connecting to target via SWD
    ConfigTargetSettings() start
    ConfigTargetSettings() end
    InitTarget() start
    CTRL-AP indicates that the device is secured.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash, SRAM and UICR of both the application and the network core.

    Any ideas to work around this? It's rough to keep reprogramming with a full erase every time

  • Hello,

    It shouldn't be necessary to perform a full erase for subsequent re-programming of the network core as longs as both the app and network core are executing the 'nrf53_handle_approtect' code on startup. Could please try with nrfjprog as instructed here (link) and see if you encounter the same problem?

Reply Children
Related