TI CC2340 Password Authentication

From SEGGER Knowledge Base
Jump to navigation Jump to search

The TI CC2340 series of comes with a security feature called Password Protection. SEGGER implemented support for this feature via a dedicated utility called Device Provisioner. For more information about this, please refer to the Device Provisioner article. CC2340 Password Protection features are implemented in the PCode_DevPro_TI_CC2340_PasswordAuth.pex script file.

Important notes

  1. Password protection can be enabled via the CCFG area.
  2. After password authentication, the device will remain unlocked until it is reset.
  3. The password file can be specified as either a text or a binary file.

Usage with other SEGGER tools

During the connection procedure of some tools or during debugging, a reset may be executed. This would cause the device to be locked again. To prevent the J-Link from resetting the target, you have the following options:

  • J-Flash: Delete the Reset init step under Options → Project settings → Init. steps.
  • Generic solution (all SEGGER tools): Include a J-Link Script file that overrides the ResetTarget() function. See ResetTarget() for details.
  • Ozone: In addition to overriding ResetTarget() in the J-Link script file, the TargetReset() function in the Ozone project file should be uncommented. This ensures that the SP and PC are set to the application start.

Usage

DevPro -operation [operation_name] -SetConfigVal [parameter_name=value] -if SWD -speed 15000 -ScriptFile PCode_DevPro_TI_CC2340_PasswordAuth.pex
Operation Parameters Values Description
PasswordAuthentication PasswordFile Filename Unlocks the device by providing the password via the SACI interface.

Examples

Password Authentication

Command

DevPro.exe -operation "PasswordAuthentication" -setconfigval PasswordFile="C:\Temp\Password.txt" -scriptfile PCode_DevPro_TI_CC2340_PasswordAuth.pex -if swd -speed 15000

Output

Command line: -operation PasswordAuthentication -setconfigval PasswordFile=C:\Temp\Password.txt -scriptfile PCode_DevPro_TI_CC2340_PasswordAuth.pex -if swd -speed 15000
Firmware: J-Link V12 compiled Aug 20 2025 13:37:32
S/N: 602004466

J-Link log:   Getting device information...
J-Link log:     CFG-AP DEVICEID: 0x1BB8402F
J-Link log:       PG1.01 device detected
J-Link log:     CFG-AP DEVICESTATUS: 0x030D8105
J-Link log:   Executing reset via SEC-AP in order to enter SACI mode...
J-Link log:     O.K.
J-Link log:   Password length (bytes): 0x0000000C
J-Link log:   Password data (hex):
J-Link log:     0x6E65704F
J-Link log:     0x73655320
J-Link log:     0x21656D61
J-Link log:   Debug Submit Authentication ...
J-Link log:   Command executed successfully
J-Link log:   Executing exit SACI mode sequence...
J-Link log:   Command executed successfully
J-Link log:     O.K.
J-Link log:   Checking if AHB-AP is enabled...
J-Link log:     O.K.
J-Link log:   Checking if debug probe loop entered...
J-Link log:     O.K.
J-Link log: Password authentication successful!