This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2340R5: Debug access questions

Part Number: CC2340R5

There are 2 configurations related to debug access in CC2340 CCFG: CCFG.permissions.allowDebugPort and CCFG.debugCfg.authorization. I'm curious about the difference between these two configurations.

1. What's the difference between these 2 configurations?

2. Which one is recommended if one wants to disable SWD debug access?

3. If either one is disabled, is it possible to perform a chip erase to recover the device?

4. Is there a configuration to only prevent flash reading on CC2340?

Best regards,

Shuyang

  • Hello Shuyang,

    CCFG.permissions.allowDebugPort: If not allowed, it will not be possible to access any part of the debug system, meaning that it will not be possible to program or erase the chip.
    CCFG.debugCfg.authorization: Determines whether debug is always allowed, debug is not allowed, or debug requires authentication (password ID and hash).

    If a reset ping is asserted followed by SWD sequence, there is a window before CCFG restrictions are applied. This opens a possibility of accessing AHB-AP if the CCFG.debugCfg.authorization is not set to CCFG_DBGAUTH_DBGFORBID. To completely lock the device it is recommended to use both configurations.  See Section 8.1.8 of the TRM.

    FLASH read-only protection is controlled with the VIMS.WEPRA and VIMS.WEPRB registers.  This is discusses in Section 7.2.4 of the TRM.  Read-only sectors cannot be erased or programmed, which protects the contents of those blocks from being modified.  There is no solution to only prevent flash reading (i.e write/erase-only).

    https://www.ti.com/lit/swcu193 

    Regards,
    Ryan