Disable APPROTECT for nRF5340

Hi,

Our team is trying to disable the Access Port Protection (APPROTECT) for the nRF5340. The main goal for this is to be able to start breakpoint debugging without needing to recover the MCU. The need to frequently recover the MCU has been slowing down our development. We are using the nRF Connect Extension inside VSCode.
I have read through the documentation to get familiar with this feature, but I seem to be misinterpreting the instructions. The relevant DevZone issues I have found provide incomplete solutions or simply refer me back to the documentation. It seems there are multiple items that need to be satisfied:
1. Disable APPROTECT in hardware (UICR)
2. Disable APPROTECT in firmware (CTRL-AP)
3. Ensure CTRL-AP.APPROTECT.DISABLE registers match for CPU and debugger
Is it possible for someone to provide a complete code example to explicitly show how to configure this?
Best regards,
Parker
Parents Reply Children
No Data
Related