CTRL-AP secured /unsecured problem when trying to view log with J-Link RTT view from nRF52840DK with loaded bsp pca10056.hex that comes with nRF5 SDK 17.1.0

Can’t RTT view even provided precompiled code that comes with nRF5 SDK v17.1.0. Tried also the .hex versions that came with older SDK back to 15.3 – same story . Tried even the Blinky example (despite it doesn’t have any logging inside) – still same CTRL-AP alertFrowning2

When connect  RTT View to the nRF52840DK and get right away a message that the device is secured and need to be unsecured.

But if I accept the proposed option Yes, then it wipes the flash including the bsp example code

If answer No  - J-Link RTT refuses to connect and aborts the session.

Found similar thread, but for different chip, so cant try the code provided there. Didn’t see (maybe missed as the thread is long ) explanation of a solution for the problem that could apply to provided examples precompiled .hex files without recompiling again?

Parents
  • Hello,

    In order to keep APPROTECT disabled across resets, it is necessary to store the 'HwDisabled' value in the non-volatile UICR.APPROTECT register. This is easiest accomplished with the 'nrfjprog --recover' command. 

    E.g.,

    $ nrfjprog --program ble_app_uart_pca10056_s140.hex --recover --verify -r

    You can also verify if the APPROTECT register is written with the 'HWDisabled' with the following command:

    $ nrfjprog --memrd 0x10001208 // Should return 0x0000005A

    Note: the new approtect mechanism is not supported in SDK 15.3.0. Please refer to IN 141 for more details.

    Best regards,

    Vidar

  • Hi Vidor,

    Thank you for quick response. Researching your answer (especially  IN 141) rise 2 more questions:

    - In  IN 141 is mentioned MDK 8.40.2 or later which I never used so far (just bare SES as it comes). Now I found the downloads for MDK for SES, but cant find any documents how to install it and how to work/use it inside SES?

    -Also, the MDK downloads come in few flavors (beside licensing) :

    nrf_mdk_8_63_1_ses_bsdlicense.empackage

    nrf_mdk_8_63_1_ses_riscv_bsdlicense.empackage

    My wild guess is that the first one is applicable for nRF52840, 52832 etc. ARM based devices?

    Thank you and best regards

Reply
  • Hi Vidor,

    Thank you for quick response. Researching your answer (especially  IN 141) rise 2 more questions:

    - In  IN 141 is mentioned MDK 8.40.2 or later which I never used so far (just bare SES as it comes). Now I found the downloads for MDK for SES, but cant find any documents how to install it and how to work/use it inside SES?

    -Also, the MDK downloads come in few flavors (beside licensing) :

    nrf_mdk_8_63_1_ses_bsdlicense.empackage

    nrf_mdk_8_63_1_ses_riscv_bsdlicense.empackage

    My wild guess is that the first one is applicable for nRF52840, 52832 etc. ARM based devices?

    Thank you and best regards

Children
Related