System Configuration

System configuration classes for chip startup, sensors, debug, GPO, and sleep mode settings.

Startup Configuration

Startup configuration (CFG_START_UP @ 0x00)

class tropicsquare.config.startup.StartUpConfig(value=0xFFFFFFFF)[source]

Bases: BaseConfig

Startup configuration register.

Controls bootloader behavior including built-in self-tests and maintenance mode.

Fields:

mbist_dis: Memory built-in self-test disable (bit 1) rngtest_dis: Random number generator test disable (bit 2) maintenance_ena: Maintenance mode enable (bit 3)

Parameters:

value (int)

property mbist_dis: bool

Memory BIST disable flag.

When True, memory built-in self-test is disabled during startup. Default: False (BIST enabled)

Returns:

True if MBIST is disabled

property rngtest_dis: bool

RNG test disable flag.

When True, random number generator test is disabled during startup. Default: False (RNG test enabled)

Returns:

True if RNG test is disabled

property maintenance_ena: bool

Maintenance mode enable flag.

When True, chip boots into maintenance mode instead of normal application mode. Default: False (normal boot)

Returns:

True if maintenance mode is enabled

to_dict()[source]

Export fields as dictionary.

Returns:

Configuration fields and their values

Return type:

dict

__str__()[source]

Human-readable representation.

Return type:

str

Sensors Configuration

Sensors configuration (CFG_SENSORS @ 0x08)

class tropicsquare.config.sensors.SensorsConfig(value=0xFFFFFFFF)[source]

Bases: BaseConfig

Sensors and fault detection configuration register.

Controls security sensors and bit-flip detection mechanisms. Each field disables a specific security feature when set to True.

Fields:

  • ptrng0_test_dis: PTRNG0 test disable (bit 0)

  • ptrng1_test_dis: PTRNG1 test disable (bit 1)

  • oscmon_dis: Oscillator monitoring disable (bit 2)

  • shield_dis: Shield monitoring disable (bit 3)

  • vmon_dis: Voltage monitoring disable (bit 4)

  • glitch_dis: Glitch detection disable (bit 5)

  • temp_dis: Temperature sensor disable (bit 6)

  • laser_dis: Laser detection disable (bit 7)

  • emp_dis: EMP detection disable (bit 8)

  • cpu_alert_dis: CPU alert disable (bit 9)

  • bf_pin_ver_dis: Bit-flip PIN verification disable (bit 10)

  • bf_scb_dis: Bit-flip SCB disable (bit 11)

  • bf_cpb_dis: Bit-flip CPB disable (bit 12)

  • bf_ecc_dis: Bit-flip ECC disable (bit 13)

  • bf_ram_dis: Bit-flip RAM disable (bit 14)

  • bf_ekdb_dis: Bit-flip EKDB disable (bit 15)

  • bf_imem_dis: Bit-flip instruction memory disable (bit 16)

  • bf_platform_dis: Bit-flip platform disable (bit 17)

Parameters:

value (int)

property ptrng0_test_dis: bool

PTRNG0 test disable (bit 0).

property ptrng1_test_dis: bool

PTRNG1 test disable (bit 1).

property oscmon_dis: bool

Oscillator monitoring disable (bit 2).

property shield_dis: bool

Shield monitoring disable (bit 3).

property vmon_dis: bool

Voltage monitoring disable (bit 4).

property glitch_dis: bool

Glitch detection disable (bit 5).

property temp_dis: bool

Temperature sensor disable (bit 6).

property laser_dis: bool

Laser detection disable (bit 7).

property emp_dis: bool

EMP detection disable (bit 8).

property cpu_alert_dis: bool

CPU alert disable (bit 9).

property bf_pin_ver_dis: bool

Bit-flip PIN verification disable (bit 10).

property bf_scb_dis: bool

Bit-flip SCB disable (bit 11).

property bf_cpb_dis: bool

Bit-flip CPB disable (bit 12).

property bf_ecc_dis: bool

Bit-flip ECC disable (bit 13).

property bf_ram_dis: bool

Bit-flip RAM disable (bit 14).

property bf_ekdb_dis: bool

Bit-flip EKDB disable (bit 15).

property bf_imem_dis: bool

Bit-flip instruction memory disable (bit 16).

property bf_platform_dis: bool

Bit-flip platform disable (bit 17).

to_dict()[source]

Export fields as dictionary.

Returns:

Configuration fields and their values

Return type:

dict

__str__()[source]

Human-readable representation.

Return type:

str

Debug Configuration

Debug configuration (CFG_DEBUG @ 0x10)

class tropicsquare.config.debug.DebugConfig(value=0xFFFFFFFF)[source]

Bases: BaseConfig

Debug configuration register.

Controls debugging features and logging.

Fields:

fw_log_en: Firmware logging enable (bit 0)

Parameters:

value (int)

property fw_log_en: bool

Firmware logging enable flag.

When True, firmware logging is enabled. Logs can be retrieved using appropriate debug commands. Default: False (logging disabled)

Returns:

True if firmware logging is enabled

Return type:

bool

to_dict()[source]

Export fields as dictionary.

Returns:

Configuration fields and their values

Return type:

dict

__str__()[source]

Human-readable representation.

Return type:

str

GPO Configuration

GPO configuration (CFG_GPO @ 0x14)

class tropicsquare.config.gpo.GpoConfig(value=0xFFFFFFFF)[source]

Bases: BaseConfig

General Purpose Output configuration register.

Controls the function of the GPO pin.

Fields:

gpo_func: GPO function selection (bits 2-0, 3-bit value)

Parameters:

value (int)

property gpo_func: int

GPO function selection (3-bit value).

Returns:

Function code (0-7)

to_dict()[source]

Export fields as dictionary.

Returns:

Configuration fields and their values

Return type:

dict

__str__()[source]

Human-readable representation.

Return type:

str

Sleep Mode Configuration

Sleep Mode configuration (CFG_SLEEP_MODE @ 0x18)

class tropicsquare.config.sleep_mode.SleepModeConfig(value=0xFFFFFFFF)[source]

Bases: BaseConfig

Sleep mode configuration register.

Controls whether the chip can enter sleep mode.

Fields:

sleep_mode_en: Sleep mode enable (bit 0)

Parameters:

value (int)

property sleep_mode_en: bool

Sleep mode enable flag.

When True, the chip can enter sleep mode for power saving. Default: False (sleep mode disabled)

Returns:

True if sleep mode is enabled

to_dict()[source]

Export fields as dictionary.

Returns:

Configuration fields and their values

Return type:

dict

__str__()[source]

Human-readable representation.

Return type:

str

See Also