Debug Authentication API

Contents

Debug Authentication API#

Debug Authentication module provides debugging for securely provisioned devices.

DAT module general information#

This module contains support for Debug Authentication Tool.

Module for generating debug credentials#

Module with DebugCredential class.

class spsdk.dat.debug_credential.DebugCredentialCertificate(family, version, uuid, rot_meta, dck_pub, cc_socu, cc_vu, cc_beacon, rot_pub, signature=None, signature_provider=None)#

Bases: FeatureBaseClass

Base class for DebugCredentialCertificate.

Initialize the DebugCredential object.

Parameters:
  • version (ProtocolVersion) – Protocol version

  • socc – The SoC Class that this credential applies to

  • uuid (bytes) – The bytes of the unique device identifier

  • rot_meta (RotMeta) – Metadata for Root of Trust

  • dck_pub (PublicKey) – Internal binary representation of Debug Credential public key

  • cc_socu (int) – The Credential Constraint value that the vendor has associated with this credential.

  • cc_vu (int) – The Vendor Usage constraint value that the vendor has associated with this credential.

  • cc_beacon (int) – The non-zero Credential Beacon value, which is bound to a DC

  • rot_pub (PublicKey) – Internal binary representation of RoT public key

  • signature (Optional[bytes]) – Debug Credential signature

  • signature_provider (Optional[SignatureProvider]) – external signature provider

FEATURE: str = 'dat'#
ROT_META_CLASS#

alias of RotMeta

abstract calculate_hash()#

Calculate the RoT hash.

Return type:

bytes

static dat_based_on_ele(family)#

Get information if the DAT is based on EdgeLock Enclave hardware.

Parameters:

family (FamilyRevision) – The chip family name

Return type:

bool

Returns:

True if the ELE is target HW, False otherwise

abstract export_dck_pub()#

Export Debugger public key (DCK) as bytes.

Return type:

bytes

Returns:

binary representing the DCK key

abstract export_rot_pub()#

Export RoT public key as bytes.

Return type:

bytes

Returns:

binary representing the RoT key

get_config(data_path='./')#

Get configuration.

Return type:

Config

classmethod get_validation_schemas(family)#

Get list of validation schemas.

Parameters:

family (FamilyRevision) – Family for what will be json schema generated.

Return type:

list[dict[str, Any]]

Returns:

Validation list of schemas.

classmethod get_validation_schemas_from_cfg(config)#

Get validation schema based on configuration.

If the class doesn’t behave generally, just override this implementation.

Parameters:

config (Config) – Valid configuration

Return type:

list[dict[str, Any]]

Returns:

Validation schemas

classmethod load_cert_block(rot_config_file, family)#

Load certificate block from a file.

Parameters:
  • rot_config_file (str) – Path to Root of Trust configuration file or binary certificate block

  • family (FamilyRevision) – Family revision for the certificate block

Return type:

CertBlock

Returns:

Loaded certificate block object

Raises:

SPSDKError – When unable to create certificate block from the file

classmethod load_from_config(config)#

Create a debug credential object out of yaml configuration.

Parameters:

config (Config) – Debug credential file configuration.

Return type:

Self

Returns:

DebugCredential object

classmethod parse(data, family=Unknown, Revision: latest)#

Parse the debug credential.

Parameters:
  • data (bytes) – Raw data as bytes

  • family (FamilyRevision) – Mandatory family name.

Return type:

Self

Returns:

DebugCredential object

property rot_hash_length: int#

Root of Trust debug credential hash length.

sign()#

Sign the DC data using SignatureProvider.

Return type:

None

property socc: int#

The SoC Class.

property srk_count: int#

Get the number of Super Root Keys (SRK).

class spsdk.dat.debug_credential.DebugCredentialCertificateEcc(family, version, uuid, rot_meta, dck_pub, cc_socu, cc_vu, cc_beacon, rot_pub, signature=None, signature_provider=None)#

Bases: DebugCredentialCertificate

Class for ECC specific of DebugCredential.

Initialize the DebugCredential object.

Parameters:
  • version (ProtocolVersion) – Protocol version

  • socc – The SoC Class that this credential applies to

  • uuid (bytes) – The bytes of the unique device identifier

  • rot_meta (RotMeta) – Metadata for Root of Trust

  • dck_pub (PublicKey) – Internal binary representation of Debug Credential public key

  • cc_socu (int) – The Credential Constraint value that the vendor has associated with this credential.

  • cc_vu (int) – The Vendor Usage constraint value that the vendor has associated with this credential.

  • cc_beacon (int) – The non-zero Credential Beacon value, which is bound to a DC

  • rot_pub (PublicKey) – Internal binary representation of RoT public key

  • signature (Optional[bytes]) – Debug Credential signature

  • signature_provider (Optional[SignatureProvider]) – external signature provider

COORDINATE_SIZE = {0: 32, 1: 48, 2: 66}#
ROT_META_CLASS#

alias of RotMetaEcc

calculate_hash()#

Get Root Of Trust Keys Hash.

Return type:

bytes

Returns:

RoTKH in bytes

export()#

Export to binary form (serialization).

Return type:

bytes

export_dck_pub()#

Export Debugger public key (DCK) as bytes.

Return type:

bytes

Returns:

binary representing the DCK key

export_rot_pub()#

Export RoT public key as bytes.

Return type:

bytes

Returns:

binary representing the RoT key

get_data_format(include_signature=True)#

Get the format of exported binary data.

Return type:

str

classmethod parse(data, family=Unknown, Revision: latest)#

Parse the debug credential.

Parameters:
  • data (bytes) – Raw data as bytes

  • family (FamilyRevision) – Mandatory family name.

Return type:

Self

Returns:

DebugCredential object

property rot_hash_length: int#

Root of Trust debug credential hash length.

class spsdk.dat.debug_credential.DebugCredentialCertificateRsa(family, version, uuid, rot_meta, dck_pub, cc_socu, cc_vu, cc_beacon, rot_pub, signature=None, signature_provider=None)#

Bases: DebugCredentialCertificate

Class for RSA specific of DebugCredentialCertificate.

Initialize the DebugCredential object.

Parameters:
  • version (ProtocolVersion) – Protocol version

  • socc – The SoC Class that this credential applies to

  • uuid (bytes) – The bytes of the unique device identifier

  • rot_meta (RotMeta) – Metadata for Root of Trust

  • dck_pub (PublicKey) – Internal binary representation of Debug Credential public key

  • cc_socu (int) – The Credential Constraint value that the vendor has associated with this credential.

  • cc_vu (int) – The Vendor Usage constraint value that the vendor has associated with this credential.

  • cc_beacon (int) – The non-zero Credential Beacon value, which is bound to a DC

  • rot_pub (PublicKey) – Internal binary representation of RoT public key

  • signature (Optional[bytes]) – Debug Credential signature

  • signature_provider (Optional[SignatureProvider]) – external signature provider

ROT_META_CLASS#

alias of RotMetaRSA

calculate_hash()#

Get Root Of Trust Keys Hash.

Return type:

bytes

Returns:

RoTKH in bytes

export()#

Export to binary form (serialization).

Return type:

bytes

Returns:

binary representation of the debug credential

Raises:

SPSDKError – When Debug Credential Signature is not set, call the sign method first

export_dck_pub()#

Export Debugger public key (DCK) as bytes.

Return type:

bytes

Returns:

binary representing the DCK key

export_rot_pub()#

Export RoT public key as bytes.

Return type:

bytes

Returns:

binary representing the RoT key

classmethod get_data_format(version, include_signature=True)#

Get the format of exported binary data.

Return type:

str

classmethod parse(data, family=Unknown, Revision: latest)#

Parse the debug credential.

Parameters:
  • data (bytes) – Raw data as bytes

  • family (FamilyRevision) – Mandatory family name.

Return type:

Self

Returns:

DebugCredential object

class spsdk.dat.debug_credential.DebugCredentialEdgeLockEnclave(family, version, uuid, rot_meta, dck_pub, cc_socu, cc_vu, cc_beacon, rot_pub, signature=None, signature_provider=None)#

Bases: DebugCredentialCertificateEcc

EdgeLock Class.

Initialize the DebugCredential object.

Parameters:
  • version (ProtocolVersion) – Protocol version

  • socc – The SoC Class that this credential applies to

  • uuid (bytes) – The bytes of the unique device identifier

  • rot_meta (RotMeta) – Metadata for Root of Trust

  • dck_pub (PublicKey) – Internal binary representation of Debug Credential public key

  • cc_socu (int) – The Credential Constraint value that the vendor has associated with this credential.

  • cc_vu (int) – The Vendor Usage constraint value that the vendor has associated with this credential.

  • cc_beacon (int) – The non-zero Credential Beacon value, which is bound to a DC

  • rot_pub (PublicKey) – Internal binary representation of RoT public key

  • signature (Optional[bytes]) – Debug Credential signature

  • signature_provider (Optional[SignatureProvider]) – external signature provider

ROT_META_CLASS#

alias of RotMetaEdgeLockEnclave

calculate_hash()#

Get Root Of Trust Keys Hash.

Return type:

bytes

Returns:

RoTKH in bytes

export()#

Export to binary form (serialization).

Return type:

bytes

get_data_format(include_signature=True)#

Get the format of exported binary data.

Return type:

str

classmethod parse(data, family=Unknown, Revision: latest)#

Parse the debug credential.

Parameters:
  • data (bytes) – Raw data as bytes

  • family (FamilyRevision) – Mandatory family name.

Return type:

Self

Returns:

DebugCredential object

property rot_hash_length: int#

Root of Trust debug credential hash length.

class spsdk.dat.debug_credential.DebugCredentialEdgeLockEnclaveV2(family, certificate)#

Bases: DebugCredentialCertificate

Debug Credential file for ELE version 2 (with PQC support).

Constructor for EdgeLock Enclave version 2 debug credential class.

ROT_META_CLASS#

alias of RotMetaDummy

SUB_FEATURE: Optional[str] = 'ele_pqc'#
property beacon: int#

DC SOCU field.

calculate_hash()#

Calculate the RoT hash.

Return type:

bytes

export()#

Export to binary form (serialization).

Return type:

bytes

export_dck_pub()#

Export Debugger public key (DCK) as bytes.

Return type:

bytes

Returns:

binary representing the DCK key

export_rot_pub()#

Export RoT public key as bytes.

Return type:

bytes

Returns:

binary representing the RoT key

classmethod get_validation_schemas(family)#

Get list of validation schemas.

Parameters:

family (FamilyRevision) – Family for what will be json schema generated.

Return type:

list[dict[str, Any]]

Returns:

Validation list of schemas.

classmethod load_from_config(config)#

Create a debug credential object out of yaml configuration.

Parameters:

config (Config) – Debug credential file configuration.

Return type:

Self

Returns:

DebugCredential object

classmethod parse(data, family=Unknown, Revision: latest)#

Parse the debug credential.

Parameters:
  • data (bytes) – Raw data as bytes

  • family (FamilyRevision) – Mandatory family name.

Return type:

Self

Returns:

DebugCredential object

sign()#

Sign the DC data using SignatureProvider.

Return type:

None

property socc: int#

DC SOCC field.

property socu: int#

DC SOCU field.

property srk_count: int#

Get the number of Super Root Keys (SRK).

Module with Debug Authentication Challenge (DAC) Packet#

Module with Debug Authentication Challenge (DAC) Packet.

class spsdk.dat.dac_packet.DebugAuthenticationChallenge(family, version, socc, uuid, rotid_rkh_revocation, rotid_rkth_hash, cc_soc_pinned, cc_soc_default, cc_vu, challenge)#

Bases: object

Base class for DebugAuthenticationChallenge.

Initialize the DebugAuthenticationChallenge object.

Parameters:
  • version (ProtocolVersion) – The string representing version: for RSA: 1.0, for ECC: 2.0, 2.1, 2.2

  • socc (int) – The SoC Class that this credential applies to

  • uuid (bytes) – The string representing the unique device identifier

  • rotid_rkh_revocation (int) – State of certificate revocation field

  • rotid_rkth_hash (bytes) – The hash of roth-meta data

  • cc_soc_pinned (int) – State of lock bits in the debugger configuration field

  • cc_soc_default (int) – State of the debugger configuration field

  • cc_vu (int) – The Vendor usage that the vendor has associated with this credential

  • challenge (bytes) – Randomly generated bytes from the target

export()#

Exports the DebugAuthenticationChallenge into bytes.

Return type:

bytes

static get_rot_hash_length(family, major_ver, minor_ver)#

Returns length of Root Of Trust hash length.

Parameters:
  • family (FamilyRevision) – The chip family name

  • major_ver (int) – Major version

  • minor_ver (int) – Minor version

Return type:

int

Returns:

Length of Root Of Trust hash in bytes

classmethod parse(data, family=Unknown, Revision: latest)#

Parse the data into a DebugAuthenticationChallenge.

Parameters:
  • data (bytes) – Raw data as bytes

  • family (FamilyRevision) – The CPU family

Return type:

Self

Returns:

DebugAuthenticationChallenge object

Module with Debug Authentication Response (DAR) Packet#

Module with Debug Authentication Response (DAR) Packet.

class spsdk.dat.dar_packet.DebugAuthenticateResponse(family, debug_credential, auth_beacon, dac, sign_provider)#

Bases: FeatureBaseClass

Class for DAR packet.

Initialize the DebugAuthenticateResponse object.

Parameters:
  • family (FamilyRevision) – Family name of used chip for DAR

  • debug_credential (DebugCredentialCertificate) – the path, where the dc is store

  • auth_beacon (int) – authentication beacon value

  • dac (DebugAuthenticationChallenge) – the path, where the dac is store

  • path_dck_private – the path, where the dck private key is store

FEATURE: str = 'dat'#
export()#

Export to binary form (serialization).

Return type:

bytes

Returns:

the exported bytes from object

get_config(data_path='./')#

Create configuration of the Feature.

Return type:

Config

classmethod get_validation_schemas(family)#

Create the validation schema.

Parameters:

family (FamilyRevision) – Family description.

Raises:

SPSDKError – Family or revision is not supported.

Return type:

list[dict[str, Any]]

Returns:

List of validation schemas.

classmethod get_validation_schemas_from_cfg(config)#

Get validation schema based on configuration.

If the class doesn’t behave generally, just override this implementation.

Parameters:

config (Config) – Valid configuration

Return type:

list[dict[str, Any]]

Returns:

Validation schemas

classmethod load_from_config(config, dac=None)#

Converts the configuration option into an Debug authentication response object.

Parameters:
  • config (Config) – Debug authentication response configuration dictionaries.

  • dac (Optional[DebugAuthenticationChallenge]) – Debug Credential Challenge

Return type:

Self

Returns:

Debug authentication response object.

classmethod parse(data)#

Parse the DAR.

Return type:

Self

verify()#

Validate Debug Authentication Response against Debug Credential and Challenge data.

This comprehensive validation method performs cross-verification of multiple debug authentication components to ensure data consistency and security compliance. The verifier systematically checks:

  • Protocol Version Compatibility: Ensures DAC (Debug Authentication Challenge) and DC (Debug Credential) use compatible protocol versions

  • SoC Class (SOCC) Validation: Verifies that the SoC Class values match between DAC, DC, and the target chip family specifications

  • Device UUID Consistency: Confirms that device unique identifiers are consistent across all authentication components, with special handling for general/wildcard UUIDs

  • Root of Trust Hash Verification: Validates that the Root of Trust Key Hash (RoTKH) matches between the challenge and credential data

  • Cryptographic Key Validation: Ensures public keys and signatures are properly formatted and mathematically valid

  • Constraint Verification: Checks credential constraints (SOCU, VU, Beacon) against challenge requirements and family-specific limitations

The method uses the DAR instance’s debug_credential, dac, and family attributes to perform validation. It generates detailed verification results with specific error messages, warnings for non-critical issues (like general UUIDs), and success confirmations for valid components.

Return type:

Verifier

Returns:

The final Verifier object containing detailed validation results and status for each checked component

class spsdk.dat.dar_packet.DebugAuthenticateResponseECC(family, debug_credential, auth_beacon, dac, sign_provider)#

Bases: DebugAuthenticateResponse

Class for DAR, using Elliptic curve keys.

Initialize the DebugAuthenticateResponse object.

Parameters:
  • family (FamilyRevision) – Family name of used chip for DAR

  • debug_credential (DebugCredentialCertificate) – the path, where the dc is store

  • auth_beacon (int) – authentication beacon value

  • dac (DebugAuthenticationChallenge) – the path, where the dac is store

  • path_dck_private – the path, where the dck private key is store

CURVE = 'secp256r1'#
KEY_LENGTH = 0#
class spsdk.dat.dar_packet.DebugAuthenticateResponseECC_256(family, debug_credential, auth_beacon, dac, sign_provider)#

Bases: DebugAuthenticateResponseECC

Class for DAR, using Elliptic curve, 256 bits sized keys.

Initialize the DebugAuthenticateResponse object.

Parameters:
  • family (FamilyRevision) – Family name of used chip for DAR

  • debug_credential (DebugCredentialCertificate) – the path, where the dc is store

  • auth_beacon (int) – authentication beacon value

  • dac (DebugAuthenticationChallenge) – the path, where the dac is store

  • path_dck_private – the path, where the dck private key is store

CURVE = 'secp256r1'#
KEY_LENGTH = 32#
class spsdk.dat.dar_packet.DebugAuthenticateResponseECC_384(family, debug_credential, auth_beacon, dac, sign_provider)#

Bases: DebugAuthenticateResponseECC

Class for DAR, using Elliptic curve, 384 bits sized keys.

Initialize the DebugAuthenticateResponse object.

Parameters:
  • family (FamilyRevision) – Family name of used chip for DAR

  • debug_credential (DebugCredentialCertificate) – the path, where the dc is store

  • auth_beacon (int) – authentication beacon value

  • dac (DebugAuthenticationChallenge) – the path, where the dac is store

  • path_dck_private – the path, where the dck private key is store

CURVE = 'secp384r1'#
KEY_LENGTH = 48#
class spsdk.dat.dar_packet.DebugAuthenticateResponseECC_521(family, debug_credential, auth_beacon, dac, sign_provider)#

Bases: DebugAuthenticateResponseECC

Class for DAR, using Elliptic curve, 521 bits sized keys.

Initialize the DebugAuthenticateResponse object.

Parameters:
  • family (FamilyRevision) – Family name of used chip for DAR

  • debug_credential (DebugCredentialCertificate) – the path, where the dc is store

  • auth_beacon (int) – authentication beacon value

  • dac (DebugAuthenticationChallenge) – the path, where the dac is store

  • path_dck_private – the path, where the dck private key is store

CURVE = 'secp521r1'#
KEY_LENGTH = 66#
class spsdk.dat.dar_packet.DebugAuthenticateResponseEdgelockEnclaveV2(family, debug_credential, auth_beacon, dac, sign_message)#

Bases: DebugAuthenticateResponse

Class for DAR, using AHAB Signed message version 2.

Constructor of DAR for devices that using EdgeLock Enclave with AHAB v2.

export()#

Export to binary form (serialization).

Return type:

bytes

Returns:

the exported bytes from object

classmethod get_validation_schemas(family)#

Create the validation schema.

Parameters:

family (FamilyRevision) – Family description.

Raises:

SPSDKError – Family or revision is not supported.

Return type:

list[dict[str, Any]]

Returns:

List of validation schemas.

classmethod load_from_config(config, dac=None)#

Converts the configuration option into an Debug authentication response object.

Parameters:
  • config (Config) – Debug authentication response configuration dictionaries.

  • dac (Optional[DebugAuthenticationChallenge]) – Debug Credential Challenge

Return type:

Self

Returns:

Debug authentication response object.

class spsdk.dat.dar_packet.DebugAuthenticateResponseRSA(family, debug_credential, auth_beacon, dac, sign_provider)#

Bases: DebugAuthenticateResponse

Class for RSA specifics of DAR packet.

Initialize the DebugAuthenticateResponse object.

Parameters:
  • family (FamilyRevision) – Family name of used chip for DAR

  • debug_credential (DebugCredentialCertificate) – the path, where the dc is store

  • auth_beacon (int) – authentication beacon value

  • dac (DebugAuthenticationChallenge) – the path, where the dac is store

  • path_dck_private – the path, where the dck private key is store

Module for NXP SPDK DebugMailbox support#

Module for NXP SPSDK DebugMailbox support.

class spsdk.dat.debug_mailbox.DebugMailbox(debug_probe, family, reset=True, moredelay=0.0, op_timeout=1000)#

Bases: object

Class for DebugMailbox.

Initialize DebugMailbox object.

Parameters:
  • debug_probe (DebugProbe) – Debug probe instance.

  • family (FamilyRevision) – Chip family.

  • reset (bool) – Do reset of debug mailbox during initialization, defaults to True.

  • moredelay (float) – Time of extra delay after reset sequence, defaults to 0.0.

  • op_timeout (int) – Atomic operation timeout, defaults to 1000.

Raises:

SPSDKIOError – Various kind of vulnerabilities during connection to debug mailbox.

close()#

Close session.

Return type:

None

dbgmlbx_reg_read(addr=0)#

Read debug mailbox access port register.

This is read debug mailbox register function for SPSDK library to support various DEBUG PROBES.

Parameters:

addr (int) – the register address

Return type:

int

Returns:

The read value of addressed register (4 bytes)

Raises:

NotImplementedError – Derived class has to implement this method

dbgmlbx_reg_write(addr=0, data=0)#

Write debug mailbox access port register.

This is write debug mailbox register function for SPSDK library to support various DEBUG PROBES.

Parameters:
  • addr (int) – the register address

  • data (int) – the data to be written into register

Raises:

NotImplementedError – Derived class has to implement this method

Return type:

None

get_dbgmlbx_ap()#

Decorator function that secure the getting right DEBUG MAILBOX AP ix for first use.

Parameters:

func – Decorated function.

read_idr()#

Read IDR of debug mailbox.

Return type:

int

Returns:

IDR value of debug mailbox AP.

spin_read(reg)#

Do atomic read operation to debug mailbox.

Parameters:

reg (int) – Register address.

Return type:

int

Returns:

Read value.

Raises:

SPSDKTimeoutError – When read operation exceed defined operation timeout.

spin_write(reg, value)#

Do atomic write operation to debug mailbox.

Parameters:
  • reg (int) – Register address.

  • value (int) – Value to write.

Raises:

SPSDKTimeoutError – When write operation exceed defined operation timeout.

Return type:

None

exception spsdk.dat.debug_mailbox.DebugMailboxError#

Bases: RuntimeError

Class for DebugMailboxError.

Module with commands for Debug Mailbox#

Commands for Debug Mailbox.

class spsdk.dat.dm_commands.DebugAuthenticationResponse(dm, paramlen)#

Bases: DebugMailboxCommand

Class for DebugAuthenticationResponse.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (17, 'DBG_AUTH_RESP', 'Debug Authentication Response')#
class spsdk.dat.dm_commands.DebugAuthenticationStart(dm, resplen=26)#

Bases: DebugMailboxCommand

Class for DebugAuthenticationStart.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (16, 'DBG_AUTH_START', 'Start Debug Authentication')#
class spsdk.dat.dm_commands.DebugMailboxCommand(dm, paramlen=0, resplen=0, delay=None, response_delay=None)#

Bases: object

Class for DebugMailboxCommand.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (0, 'GENERAL', 'Dummy command')#
DELAY_DEFAULT = 0.03#
run(params=None)#

Run DebugMailboxCommand.

Return type:

list[Any]

run_safe(raise_if_failure=True, **args)#

Run a command and abort on first failure instead of looping forever.

Return type:

Optional[list[Any]]

class spsdk.dat.dm_commands.DebugMailboxCommandID(tag, label, description=None)#

Bases: SpsdkEnum

Enumeration of all Debug Mailbox commands.

This enum provides a centralized reference for all command IDs, names, and descriptions used in the Debug Mailbox protocol.

DBG_AUTH_RESP = (17, 'DBG_AUTH_RESP', 'Debug Authentication Response')#
DBG_AUTH_START = (16, 'DBG_AUTH_START', 'Start Debug Authentication')#
ENTER_BLANK_DEBUG_AUTH = (8, 'ENTER_BLANK_DEBUG_AUTH', 'Enter Blank Debug Authentication')#
ENTER_ISP_MODE = (5, 'ENTER_ISP_MODE', 'Enter In-System Programming mode')#
ERASE_FLASH = (3, 'ERASE_FLASH', 'Erase entire Flash memory')#
ERASE_ONE_SECTOR = (11, 'ERASE_ONE_SECTOR', 'Erase a single Flash sector')#
EXIT = (4, 'EXIT', 'Exit Debug Mailbox')#
GENERAL = (0, 'GENERAL', 'Dummy command')#
GET_CRP_LEVEL = (2, 'GET_CRP_LEVEL', 'Get Code Read Protection Level')#
NXP_DBG_AUTH_RESP = (19, 'NXP_DBG_AUTH_RESP', 'NXP-specific Debug Authentication Response')#
NXP_DBG_AUTH_START = (18, 'NXP_DBG_AUTH_START', 'NXP-specific Debug Authentication Start')#
NXP_EXEC_PROV_FW = (21, 'NXP_EXEC_PROV_FW', 'Execute Provisioning NXP Firmware')#
NXP_SSF_INSERT_CERT = (20, 'NXP_SSF_INSERT_CERT', 'Create self-signed certificate as part of Self sign flow ')#
SET_FA_MODE = (6, 'SET_FA_MODE', 'Set Fault Analysis mode')#
START = (1, 'START', 'Start Debug Mailbox')#
START_DBG_SESSION = (7, 'START_DBG_SESSION', 'Start Debug Session')#
WRITE_TO_FLASH = (9, 'WRITE_TO_FLASH', 'Write data to Flash memory')#
class spsdk.dat.dm_commands.DebugMailboxCommandID2(tag, label, description=None)#

Bases: SpsdkEnum

Enumeration of all Debug Mailbox commands.

Different implementation for some devices.

NXP_EXEC_PROV_FW = (19, 'NXP_EXEC_PROV_FW', 'Execute Provisioning NXP Firmware')#
NXP_SSF_INSERT_DUK = (18, 'NXP_SSF_INSERT_DUK', 'Create NXP PUF AC code store area as part of Self sign flow (SSF)')#
class spsdk.dat.dm_commands.EnterBlankDebugAuthentication(dm)#

Bases: DebugMailboxCommand

Class for EnterBlankDebugAuthentication.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (8, 'ENTER_BLANK_DEBUG_AUTH', 'Enter Blank Debug Authentication')#
class spsdk.dat.dm_commands.EnterISPMode(dm)#

Bases: DebugMailboxCommand

Class for EnterISPMode.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (5, 'ENTER_ISP_MODE', 'Enter In-System Programming mode')#
class spsdk.dat.dm_commands.EraseFlash(dm)#

Bases: DebugMailboxCommand

Class for Erase Flash.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (3, 'ERASE_FLASH', 'Erase entire Flash memory')#
class spsdk.dat.dm_commands.EraseOneSector(dm)#

Bases: DebugMailboxCommand

Class for Erase One Sector.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (11, 'ERASE_ONE_SECTOR', 'Erase a single Flash sector')#
class spsdk.dat.dm_commands.ExitDebugMailbox(dm, paramlen=0, resplen=0, delay=None, response_delay=None)#

Bases: DebugMailboxCommand

Class for ExitDebugMailbox.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (4, 'EXIT', 'Exit Debug Mailbox')#
class spsdk.dat.dm_commands.GetCRPLevel(dm, paramlen=0, resplen=0, delay=None, response_delay=None)#

Bases: DebugMailboxCommand

Class for Get CRP Level.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (2, 'GET_CRP_LEVEL', 'Get Code Read Protection Level')#
class spsdk.dat.dm_commands.NxpDebugAuthenticationResponse(dm, paramlen)#

Bases: DebugMailboxCommand

Class for DebugAuthenticationResponse.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (19, 'NXP_DBG_AUTH_RESP', 'NXP-specific Debug Authentication Response')#
class spsdk.dat.dm_commands.NxpDebugAuthenticationStart(dm, resplen=26)#

Bases: DebugMailboxCommand

Class for DebugAuthenticationStart.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (18, 'NXP_DBG_AUTH_START', 'NXP-specific Debug Authentication Start')#
class spsdk.dat.dm_commands.NxpExecuteProvisioningFw(dm, paramlen=0, resplen=0, delay=None, response_delay=None)#

Bases: DebugMailboxCommand

Class for Execute provisioning firmware command.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (19, 'NXP_EXEC_PROV_FW', 'Execute Provisioning NXP Firmware')#
class spsdk.dat.dm_commands.NxpSsfInsertCert(dm, paramlen=8, resplen=696, response_delay=1.0)#

Bases: DebugMailboxCommand

Command to create self-signed certificate as part of Self sign flow (SSF).

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (20, 'NXP_SSF_INSERT_CERT', 'Create self-signed certificate as part of Self sign flow ')#
class spsdk.dat.dm_commands.NxpSsfInsertDuk(dm, paramlen=8, resplen=16)#

Bases: DebugMailboxCommand

Class to create NXP PUF AC code store area as part of Self sign flow (SSF).

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (18, 'NXP_SSF_INSERT_DUK', 'Create NXP PUF AC code store area as part of Self sign flow (SSF)')#
class spsdk.dat.dm_commands.SetFaultAnalysisMode(dm, paramlen=0)#

Bases: DebugMailboxCommand

Class for SetFaultAnalysisMode.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (6, 'SET_FA_MODE', 'Set Fault Analysis mode')#
class spsdk.dat.dm_commands.StartDebugMailbox(dm, paramlen=0, resplen=0, delay=None, response_delay=None)#

Bases: DebugMailboxCommand

Class for StartDebugMailbox.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (1, 'START', 'Start Debug Mailbox')#
class spsdk.dat.dm_commands.StartDebugSession(dm, paramlen=0, resplen=0, delay=None, response_delay=None)#

Bases: DebugMailboxCommand

Class for StartDebugSession.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (7, 'START_DBG_SESSION', 'Start Debug Session')#
class spsdk.dat.dm_commands.WriteToFlash(dm)#

Bases: DebugMailboxCommand

Class for Write To Flash.

Initialize.

CMD: Union[DebugMailboxCommandID, DebugMailboxCommandID2] = (9, 'WRITE_TO_FLASH', 'Write data to Flash memory')#