# Device Configs

Device configuration settings (device configs) are named variables scoped to devices to allow advanced users to configure certain behaviors. Use the following commands to enumerate the available device configs:

    ipc.config.show() # Shows the name and current value of all configs for all devices
    ipc.config.show_help() # Shows the name and description of all configs for all devices

    ipc.config.<device>.show() # Shows the name and current value of all configs for a specific device
    ipc.config.<device>.show_help() # Shows the name and description of all configs for a specific device

Device config values are strings and can be accessed/modified using the following syntax:

    ipc.config.<device>.<config> # Returns the current value of a config as a string
    ipc.config.<device>.<config> = '<value>' # Sets the value of a config from a string

Device configs that have been modified since the beginning of a debug session can be enumerated using the following syntax:

    ipc.config.show_modified() # Shows the name, current value, and initial value of all modified configs
    ipc.config.revert_modified() # Retores all modified configuration settings to their initial value

The specific configs available depends on IPC API configuration and the target/probe combination. Not all of the device configs listed here will be available for all configurations. If a probe is hot-plugged or new devices are discovered on re-configuration then additional device configs may become available.

## Common Examples

Set the JTAG TCLK rate on the first JTAG chain:

    ipc.config.jtagscanchain0.Jtag.TclkRate = '8000000'

Use JTAG for probe mode entry and detection on the first debug port:

    ipc.config.debugport0.PlatformControl.PreqNotWired = 'true'
    ipc.config.debugport0.PlatformControl.PrdyNotWired = 'true'

## JTAG Chain Device Configs

Name | Description
Jtag.TclkRate | In hertz, the frequency at which the JTAG pins are driven for issuing JTAG scans.

## Debug Port Device Configs

Name | Description
PlatformControl.PlatformType | The type of platform the debug port is connected to; affects how high-level platform operations (e.g. stalls) are performed.
PlatformControl.PowerOffDelay | In milliseconds, the amount of time to wait after power loss before attempting to power target system back on.
PlatformControl.PowerOffTimeout | In milliseconds, the amount of time to wait for the target to power down before aborting.
PlatformControl.PowerOnDelay | In milliseconds, the amount of time to wait after power restore before issuing commands to the debug port.
PlatformControl.PowerOnPulseWidth | In nanoseconds, the pulse width of the pin assertion used to power the target system back on.
PlatformControl.PrdyNotWired | Whether the PRDY pin is not wired. If using OpenRC then PRDY will not be used for probe mode detection or instruction submission while this is true (‘true’ or ‘false’).
PlatformControl.PreqNotWired | Whether the PREQ pin is not wired. If using OpenRC then PREQ will not be used for probe mode entry while this is true (‘true’ or ‘false’).
PlatformControl.ResetDelay | In milliseconds, the amount of time to wait after reset of the target system.
PlatformControl.ResetPulseWidth | In nanoseconds, the pulse width of the pin assertion used to reset the target system.

## Core Group Device Configs

Name | Description
RunControl.HaltPrdyTimeout | In milliseconds, the maximum time to wait for a PRDY event after a halt is requested.
RunControl.PrdyRunStatusPollingEnabled | Whether the run status of the target is periodically polled to detect probe mode entry while waiting for an expected PRDY signal from the target, such as during a halt or step operation (‘true’ or ‘false’).
RunControl.PrdyRunStatusPollingInterval | In milliseconds, the interval of time between each TAP status poll iteration when periodically polling to detect probe mode entry while waiting for an expected PRDY signal.
RunControl.ProbeModeDetectMethod | Selects which method is used to detect probe mode entry.
RunControl.ProbeModeEntryMethod | Selects which method is used to request probe mode entry.
RunControl.ProbeModeExitMethod | Selects which method is used to request probe mode exit.
RunControl.RunStatusPollingInterval | In milliseconds, the minimum time to wait between polling the run status of the threads under a debug port.
RunControl.StepMode | Specifies how the non-targeted threads are handled when stepping (‘ReleaseTargetedThread’ or ‘ReleaseAllThreads’).
RunControl.ThreadHaltTimeout | In milliseconds, the maximum time to wait for threads to enter probe mode after a PRDY event.
RunControl.WaitInstructionCompletionMode | Specifies how the non-targeted threads are handled when stepping (‘DeadWait’, ‘Prdy’, or ‘Polling’).

## Root Device Configs

Name | Description
Jtag.DetectDevicesAtStartupRetries | The maximum number of times to retry detecting taps on a scan chain. Only used when Jtag.EnableLowPowerDebug is enabled.
Jtag.EnableLowPowerDebug | When enabled, additional wake up scans may be performed for cores. And device detection will be retried when no devices are found on a jtag scanchain.
TargetManager.AdjustDevices | When enabled, additional scans are performed after the device tree has been built to adjust the device tree to more accurately reflect what is enabled and accessible (e.g. reading status TAP registers, idcodes, etc) (‘true’ or ‘false).
TargetManager.DetectDevices | When enabled, a TAP reset overscan will be performed in order to detect top-level TAPs on the JTAG chain(s) when the device tree is built or updated. The TAP network XML is used to build the device tree below the top-level TAPs that were detected (‘true’ or ‘false).
TargetManager.UpdateTopologyOnReset | When enabled, a topology update will be triggered in response to a reset completed event (‘true’ or ‘false).
TargetOS | This setting controls the amount of time to wait for cores to wake up. When set to ‘Windows’, ‘Jtag.EnableLowPowerDebug’ will also be set to ‘true’.
TimeScale | Percentage to scale wall-clock time for time-related operations.