24.0 Device Configuration [T-Series Datasheet]
Overview
Device Configuration (also referred to as IO_Config) serves two primary functions: it controls the settings that are loaded during device boot-up and can reset an active device to a predefined state.
Device Configuration saves and sets the configuration for the following systems:
DIO: Digital states, directions, pull-up, pull-downs, and the analog configuration of flexible lines (T4 only).
DAC: The output voltage for each DACs
DIO_EF: The configuration of the DIO_EF for each DIO.
AIN: Setting such as range, resolution, differential, and settling.
AIN_EF: The configuration of the AIN_EF for each AIN.
Configuration Set Definitions
FACTORY: This is the configuration loaded during manufacturing. Under this setting, all DIO are configured as inputs with pull-ups enabled and pull-downs disabled. Both DIO_EFs and AIN_EFs are disabled, DAC outputs set to zero volts, and AINs are set to range index zero and resolution index zero.
BOOTUP: (Previously referred to as DEFAULT) Represents the saved configuration set which will be loaded during device boot-up.
CURRENT: The current configuration. This includes any changes that have been applied since boot-up.
WARNING
The term DEFAULT is used in other features of the T-Series devices. To improve clarity, the Device Configuration system has changed from using DEFAULT to BOOTUP. This applies to register names. The registers using DEFAULT are still accessible, if the BOOTUP register name throws an error, either update the LJM_Constants definitions file or switch to the DEFAULT register.
Operation
Boot-up
During boot-up the configuration settings are loaded in three key steps:
Early DIO configuration: The DIO settings are loaded as soon as possible in the boot-up process. This ensure that a fail safe configuration can be loaded quickly. Typical time between the start of the boot-up process and the configuration being loaded is ~2.5 ms, see the Startup Delay section below for more details.
Jumpers are tested: The device will scan for connected SPC jumpers. During the scanning process, any DIO used by the jumper system will be set to input. Applications which may be impacted by the IO being set to input should use lines which are not used by the SPC jumper system.
Final configuration load: All BOOTUP settings listed above are loaded. If the SPC jumper for factory settings was used, then factory settings will be loaded. Typical time between the start of the boot-up process and the configuration being loaded is ~700 ms, see the Startup Delay section below for more details.
Saving Changes
Once a T-Series device is up and running, the initial boot-up configuration can be changed by writing to the relevant configuration registers. Keep in mind that changes made after boot-up aren't automatically saved. To save your current settings as the new boot-up configuration, simply write to the IO_CONFIG_SET_BOOTUP_TO_CURRENT
register.
At any time, you can also load a different configuration set, which is handy when you're using the device for various experiments and need to quickly set the I/O to a known state. To do this, write to one of the following registers:
IO_CONFIG_SET_CURRENT_TO_FACTORY
IO_CONFIG_SET_CURRENT_TO_BOOTUP
Testing the Configuration
The CURRENT configuration can be compared to either FACTORY or BOOTUP. To do so, use the following registers:
IO_CONFIG_CHECK_FOR_FACTORY
IO_CONFIG_CHECK_FOR_BOOTUP
Clearing the Configuration
The configuration can be cleared by writing to the IO_CONFIG_SET_BOOTUP_TO_FACTORY register, or by using the Cleanse feature.
Saving I/O Configurations using Kipling
The Global Configurations and Power-Up Defaults tabs in Kipling can also be used to setup I/O Configurations. This Kipling feature uses the registers described above, it does not add any device functionality. It does add the ability to save configuration to a file sot that it can be copied to other devices.
Factory Reset
IO_Config settings can be cleared by a factory reset. See the 11.0 SPC section for more information.
Startup Delay
When a T-Series device starts up it must perform an initialization sequence before the startup defaults can be applied. Before the startup settings are applied, all DIO are in the input state which has a 100k pull-up to 3.3V. EIO0 is a special case, during this pre-config time only, where it behaves more like it has a 10k pull-up to 3.3V. The pull-ups on the T4 default to off. Without the pull-ups the lines are floating until the startup settings are applied. Startup defaults are divided into two groups depending on where they are applied in the startup sequence. The two groups are:
Fast DIO - Directions and States for DIO lines which are not used for SPC jumpers. Typically applied ~2.5 ms (Tested with T7 1.0288) after power is applied. This is true for all T4 bootloaders, and T7 bootloader 0.96. Prior to T7 bootloader 0.96, all DIO acted like "Slow DIO" described below.
Slow DIO - Directions and States for DIO lines which are used for SPC jumpers, DIO_EF for all lines, AIN_EF, Ethernet, analog settings, etc. Typically applied ~700 ms (Tested with T7 1.0288) after power is applied. Note that the firmware update process will increase this time to ~12 seconds.
Checksum
The IO_CONFIG_CURRENT_CRC32
register returns a CRC32 of the configuration data. The CRC can be used to detect configuration changes. Calculating the checksum takes between 5 and 15 ms. Some configurations are excluded from the CRC because they are expected to change during normal operations. The excluded configurations are:
Digital States
Digital Directions
DAC Voltages
Device Configuration Registers
Examples