|
AMU Library 3.0
C/C++ library for communicating with AMU (Aerospace Measurement Unit) devices
|
AMU Command Definitions and SCPI Command Mappings. More...
Go to the source code of this file.
Macros | |
| #define | CMD_RW_BIT 7 |
| #define | CMD_READ (1<<CMD_RW_BIT) |
| #define | CMD_WRITE (0<<CMD_RW_BIT) |
| #define | CMD_I2C_USB 0x0100 |
| TODO. | |
| #define | CMD_USB_ONLY 0x0200 |
| #define | CMD_SYSTEM_OFFSET CMD_I2C_USB + 0x00 |
| #define | CMD_SYSTEM_LED_OFFSET CMD_I2C_USB + 0x10 |
| #define | CMD_DUT_OFFSET CMD_I2C_USB + 0x20 |
| #define | CMD_EXEC_OFFSET CMD_I2C_USB + 0x30 |
| #define | CMD_SWEEP_OFFSET CMD_I2C_USB + 0x40 |
| #define | CMD_AUX_OFFSET CMD_I2C_USB + 0x50 |
| #define | CMD_ADC_CH_OFFSET CMD_I2C_USB + 0x60 |
| #define | CMD_MEAS_CH_CMD_OFFSET CMD_I2C_USB + 0x70 |
| #define | CMD_USB_SYSTEM_OFFSET CMD_USB_ONLY + 0x00 |
| #define | CMD_USB_EEPROM_CMD_OFFSET CMD_USB_ONLY + 0x10 |
| #define | CMD_USB_ADC_VOLTAGE_CMD_OFFSET CMD_USB_ONLY + 0x20 |
| #define | CMD_USB_ADC_CURRENT_CMD_OFFSET CMD_USB_ONLY + 0x30 |
| #define | CMD_USB_SWEEP_OFFSET CMD_USB_ONLY + 0x40 |
| #define | CMD_USB_SYSTEM_CONFIG_OFFSET CMD_USB_ONLY + 0x50 |
| #define | AMU_GET_CMD_ROOT(cmd) |
| #define | AMU_GET_CMD_BRANCH(cmd) |
Enumerations | |
| enum | CMD_t { CMD_SYSTEM = 0x0100 + 0x00 , CMD_SYSTEM_LED = 0x0100 + 0x10 , CMD_DUT = 0x0100 + 0x20 , CMD_EXEC = 0x0100 + 0x30 , CMD_SWEEP = 0x0100 + 0x40 , CMD_AUX = 0x0100 + 0x50 , CMD_ADC_CH = 0x0100 + 0x60 , CMD_MEAS_CH = 0x0100 + 0x70 , CMD_USB_SYSTEM = 0x0200 + 0x00 , CMD_USB_EEPROM = 0x0200 + 0x10 , CMD_USB_ADC_VOLTAGE = 0x0200 + 0x20 , CMD_USB_ADC_CURRENT = 0x0200 + 0x30 , CMD_USB_SWEEP = 0x0200 + 0x40 , CMD_USB_SYSTEM_CONFIG = 0x0200 + 0x50 } |
| enum | CMD_SYSTEM_t { CMD_SYSTEM_NO_CMD = 0x0100 + 0x00+ 0x00 , CMD_SYSTEM_RESET = 0x0100 + 0x00+ 0x01 , CMD_SYSTEM_XMEGA_FUSES = 0x0100 + 0x00+ 0x02 , CMD_SYSTEM_TWI_ADDRESS = 0x0100 + 0x00+ 0x03 , CMD_SYSTEM_TWI_NUM_DEVICES = 0x0100 + 0x00+ 0x04 , CMD_SYSTEM_TWI_STATUS = 0x0100 + 0x00+ 0x05 , CMD_SYSTEM_FIRMWARE = 0x0100 + 0x00+ 0x06 , CMD_SYSTEM_SERIAL_NUM = 0x0100 + 0x00+ 0x07 , CMD_SYSTEM_TEMPERATURE = 0x0100 + 0x00+ 0x08 , CMD_SYSTEM_TIME = 0x0100 + 0x00+ 0x09 , CMD_SYSTEM_UTC_TIME = 0x0100 + 0x00+ 0x0A , CMD_SYSTEM_LED_COLOR = 0x0100 + 0x00+ 0x0B , CMD_SYSTEM_XMEGA_USER_SIGNATURES = 0x0100 + 0x00+ 0x0C , CMD_SYSTEM_SLEEP = 0x0100 + 0x00+ 0x0F } |
| I2C System command identifiers. More... | |
| enum | CMD_DUT_t { CMD_DUT_JUNCTION = 0x0100 + 0x20+ 0x00 , CMD_DUT_COVERGLASS = 0x0100 + 0x20+ 0x01 , CMD_DUT_INTERCONNECT = 0x0100 + 0x20+ 0x02 , CMD_DUT_RESERVED = 0x0100 + 0x20+ 0x03 , CMD_DUT_MANUFACTURER = 0x0100 + 0x20+ 0x04 , CMD_DUT_MODEL = 0x0100 + 0x20+ 0x05 , CMD_DUT_TECHNOLOGY = 0x0100 + 0x20+ 0x06 , CMD_DUT_SERIAL_NUMBER = 0x0100 + 0x20+ 0x07 , CMD_DUT_ENERGY = 0x0100 + 0x20+ 0x08 , CMD_DUT_DOSE = 0x0100 + 0x20+ 0x09 , CMD_DUT_NOTES = 0x0100 + 0x20+ 0x0B , CMD_DUT_TSENSOR_TYPE = 0x0100 + 0x20+ 0x0D , CMD_DUT_TSENSOR_NUMBER = 0x0100 + 0x20+ 0x0E , CMD_DUT_TSENSOR_FIT = 0x0100 + 0x20+ 0x0F } |
| Device Under Test (DUT) command identifiers. More... | |
| enum | CMD_EXEC_t { CMD_EXEC_MEAS_ACTIVE_CHANNELS = 0x0100 + 0x30+ 0x00 , CMD_EXEC_MEAS_CHANNEL = 0x0100 + 0x30+ 0x01 , CMD_EXEC_MEAS_TSENSORS = 0x0100 + 0x30+ 0x02 , CMD_EXEC_MEAS_INTERNAL_VOLTAGES = 0x0100 + 0x30+ 0x03 , CMD_EXEC_MEAS_SUN_SENSOR = 0x0100 + 0x30+ 0x04 , CMD_EXEC_MEAS_PRESSURE_SENSOR = 0x0100 + 0x30+ 0x05 , CMD_EXEC_ADC_CAL = 0x0100 + 0x30+ 0x07 , CMD_EXEC_ADC_CAL_ALL_INTERNAL = 0x0100 + 0x30+ 0x08 , CMD_EXEC_ADC_CAL_SAVE_ALL_INTERNAL = 0x0100 + 0x30+ 0x09 , CMD_EXEC_DAC_CAL = 0x0100 + 0x30+ 0x0A , CMD_EXEC_DAC_CAL_SAVE = 0x0100 + 0x30+ 0x0B , CMD_EXEC_TSENSOR_CAL_25C = 0x0100 + 0x30+ 0x0C , CMD_EXEC_TSENSOR_COEFF_SAVE = 0x0100 + 0x30+ 0x0D , CMD_EXEC_SUNSENSOR_COEFF_SAVE = 0x0100 + 0x30+ 0x0E , CMD_EXEC_HEATER_PID_SAVE = 0x0100 + 0x30+ 0x0F } |
| Execution and measurement command identifiers. More... | |
| enum | CMD_SWEEP_t { CMD_SWEEP_DISABLE = 0x0100 + 0x40+ 0x00 , CMD_SWEEP_ENABLE = 0x0100 + 0x40+ 0x01 , CMD_SWEEP_TRIG_SWEEP = 0x0100 + 0x40+ 0x02 , CMD_SWEEP_TRIG_ISC = 0x0100 + 0x40+ 0x03 , CMD_SWEEP_TRIG_VOC = 0x0100 + 0x40+ 0x04 , CMD_SWEEP_CONFIG_SAVE = 0x0100 + 0x40+ 0x05 , CMD_SWEEP_IV_SAVE_TO_EEPROM = 0x0100 + 0x40+ 0x06 , CMD_SWEEP_IV_LOAD_FROM_EEPROM = 0x0100 + 0x40+ 0x07 , CMD_SWEEP_AES_ENCODE = 0x0100 + 0x40+ 0x08 , CMD_SWEEP_AES_DECODE = 0x0100 + 0x40+ 0x09 , CMD_SWEEP_DATAPOINT_SAVE = 0x0100 + 0x40+ 0x0A , CMD_SWEEP_TRIG_INIT = 0x0100 + 0x40+ 0x0B , CMD_SWEEP_DATAPOINT_LOAD = 0x0100 + 0x40+ 0x0C } |
| I-V sweep control command identifiers. More... | |
| enum | CMD_AUX_t { CMD_AUX_DAC_STATE = 0x0100 + 0x50+ 0x00 , CMD_AUX_DAC_CURRENT = 0x0100 + 0x50+ 0x01 , CMD_AUX_DAC_CURRENT_RAW = 0x0100 + 0x50+ 0x02 , CMD_AUX_DAC_VOLTAGE = 0x0100 + 0x50+ 0x03 , CMD_AUX_DAC_VOLTAGE_RAW = 0x0100 + 0x50+ 0x04 , CMD_AUX_DAC_OFFSET = 0x0100 + 0x50+ 0x05 , CMD_AUX_DAC_OFFSET_CORRECTION = 0x0100 + 0x50+ 0x06 , CMD_AUX_DAC_GAIN_CORRECTION = 0x0100 + 0x50+ 0x07 , CMD_AUX_HEATER_STATE = 0x0100 + 0x50+ 0x08 , CMD_AUX_HEATER_SETPOINT = 0x0100 + 0x50+ 0x09 , CMD_AUX_HEATER_PID = 0x0100 + 0x50+ 0x0A , CMD_AUX_SUNSENSOR_FIT_YAW_COEFF = 0x0100 + 0x50+ 0x0B , CMD_AUX_SUNSENSOR_FIT_PITCH_COEFF = 0x0100 + 0x50+ 0x0C , CMD_AUX_SUNSENSOR_HVAL = 0x0100 + 0x50+ 0x0D , CMD_AUX_SUNSENSOR_RVAL = 0x0100 + 0x50+ 0x0E , CMD_AUX_SUNSENSOR_THRESHOLD = 0x0100 + 0x50+ 0x0F } |
| Auxiliary subsystem command identifiers. More... | |
| enum | CMD_ADC_CH_t { CMD_ADC_CH_REG = 0x0100 + 0x60+ 0x00 , CMD_ADC_CH_SETUP = 0x0100 + 0x60+ 0x01 , CMD_ADC_CH_FILTER = 0x0100 + 0x60+ 0x02 , CMD_ADC_CH_RATE = 0x0100 + 0x60+ 0x03 , CMD_ADC_CH_PGA = 0x0100 + 0x60+ 0x04 , CMD_ADC_CH_PGA_MAX = 0x0100 + 0x60+ 0x05 , CMD_ADC_CH_PGA_VMAX = 0x0100 + 0x60+ 0x06 , CMD_ADC_CH_PGA_IMAX = 0x0100 + 0x60+ 0x07 , CMD_ADC_CH_SAVE = 0x0100 + 0x60+ 0x08 , CMD_ADC_CH_OFFSET_COEFF = 0x0100 + 0x60+ 0x09 , CMD_ADC_CH_GAIN_COEFF = 0x0100 + 0x60+ 0x0A , CMD_ADC_CH_CAL_INTERNAL = 0x0100 + 0x60+ 0x0B , CMD_ADC_CH_CAL_ZERO_SCALE = 0x0100 + 0x60+ 0x0C , CMD_ADC_CH_CAL_FULL_SCALE = 0x0100 + 0x60+ 0x0D , CMD_ADC_CH_CAL_RESET = 0x0100 + 0x60+ 0x0E , CMD_ADC_CH_CAL_SAVE = 0x0100 + 0x60+ 0x0F } |
| ADC channel configuration command identifiers. More... | |
| enum | CMD_MEAS_CH_t { CMD_MEAS_CH_VOLTAGE = 0x0100 + 0x70+ 0x00 , CMD_MEAS_CH_CURRENT = 0x0100 + 0x70+ 0x01 , CMD_MEAS_CH_TSENSOR = 0x0100 + 0x70+ 0x02 , CMD_MEAS_CH_TSENSOR_0 = 0x0100 + 0x70+ 0x02 , CMD_MEAS_CH_TSENSOR_1 = 0x0100 + 0x70+ 0x03 , CMD_MEAS_CH_TSENSOR_2 = 0x0100 + 0x70+ 0x04 , CMD_MEAS_CH_BIAS = 0x0100 + 0x70+ 0x05 , CMD_MEAS_CH_OFFSET = 0x0100 + 0x70+ 0x06 , CMD_MEAS_CH_TEMP = 0x0100 + 0x70+ 0x07 , CMD_MEAS_CH_AVDD = 0x0100 + 0x70+ 0x08 , CMD_MEAS_CH_IOVDD = 0x0100 + 0x70+ 0x09 , CMD_MEAS_CH_ALDO = 0x0100 + 0x70+ 0x0A , CMD_MEAS_CH_DLDO = 0x0100 + 0x70+ 0x0B , CMD_MEAS_CH_SS_TL = 0x0100 + 0x70+ 0x0C , CMD_MEAS_CH_SS_BL = 0x0100 + 0x70+ 0x0D , CMD_MEAS_CH_SS_BR = 0x0100 + 0x70+ 0x0E , CMD_MEAS_CH_SS_TR = 0x0100 + 0x70+ 0x0F } |
| Measurement channel command identifiers. More... | |
| enum | CMD_USB_SYSTEM_t { CMD_USB_SYSTEM_ENTER_BOOTLOADER = 0x0200 + 0x00+ 0x00 , CMD_USB_SYSTEM_LIST_SCPI_COMMANDS = 0x0200 + 0x00+ 0x01 , CMD_USB_SYSTEM_TWI_SCAN = 0x0200 + 0x00+ 0x02 , CMD_USB_SYSTEM_TWI_MODE = 0x0200 + 0x00+ 0x03 , CMD_USB_SYSTEM_DEBUG = 0x0200 + 0x00+ 0x04 } |
| USB-only system command identifiers. More... | |
| enum | CMD_USB_EEPROM_t { CMD_USB_EEPROM_ERASE_ALL = 0x0200 + 0x10+ 0x00 , CMD_USB_EEPROM_ERASE_CONFIG = 0x0200 + 0x10+ 0x01 , CMD_USB_EEPROM_OFFSET = 0x0200 + 0x10+ 0x02 , CMD_USB_EEPROM_GAIN = 0x0200 + 0x10+ 0x03 , CMD_USB_EEPROM_VOLTAGE_OFFSET = 0x0200 + 0x10+ 0x04 , CMD_USB_EEPROM_CURRENT_OFFSET = 0x0200 + 0x10+ 0x05 , CMD_USB_EEPROM_VOLTAGE_GAIN = 0x0200 + 0x10+ 0x06 , CMD_USB_EEPROM_CURRENT_GAIN = 0x0200 + 0x10+ 0x07 } |
| USB-only EEPROM command identifiers. More... | |
| enum | CMD_USB_ADC_VOLTAGE_t { CMD_USB_ADC_VOLTAGE_CAL_ZERO = 0x0200 + 0x20+ 0x00 , CMD_USB_ADC_VOLTAGE_CAL_FULL = 0x0200 + 0x20+ 0x01 , CMD_USB_ADC_VOLTAGE_CAL_RESET = 0x0200 + 0x20+ 0x02 , CMD_USB_ADC_VOLTAGE_CAL_SAVE = 0x0200 + 0x20+ 0x03 , CMD_USB_ADC_VOLTAGE_PGA = 0x0200 + 0x20+ 0x04 , CMD_USB_ADC_VOLTAGE_MAX = 0x0200 + 0x20+ 0x05 , CMD_USB_ADC_VOLTAGE_OFFSET = 0x0200 + 0x20+ 0x06 , CMD_USB_ADC_VOLTAGE_GAIN = 0x0200 + 0x20+ 0x07 , CMD_USB_ADC_VOLTAGE_MAX_PGA = 0x0200 + 0x20+ 0x08 } |
| USB-only voltage ADC command identifiers. More... | |
| enum | CMD_USB_ADC_CURRENT_t { CMD_USB_ADC_CURRENT_CAL_ZERO = 0x0200 + 0x30+ 0x00 , CMD_USB_ADC_CURRENT_CAL_FULL = 0x0200 + 0x30+ 0x01 , CMD_USB_ADC_CURRENT_CAL_RESET = 0x0200 + 0x30+ 0x02 , CMD_USB_ADC_CURRENT_CAL_SAVE = 0x0200 + 0x30+ 0x03 , CMD_USB_ADC_CURRENT_PGA = 0x0200 + 0x30+ 0x04 , CMD_USB_ADC_CURRENT_MAX = 0x0200 + 0x30+ 0x05 , CMD_USB_ADC_CURRENT_OFFSET = 0x0200 + 0x30+ 0x06 , CMD_USB_ADC_CURRENT_GAIN = 0x0200 + 0x30+ 0x07 , CMD_USB_ADC_CURRENT_MAX_PGA = 0x0200 + 0x30+ 0x08 } |
| USB-only current ADC command identifiers. More... | |
| enum | CMD_USB_SWEEP_t { CMD_USB_SWEEP_TRIGGER = 0x0200 + 0x40+ 0x00 } |
| USB-only sweep command identifiers. More... | |
| enum | CMD_USB_SYSTEM_CONFIG_t { CMD_USB_SYSTEM_CONFIG_CURR_GAIN = 0x0200 + 0x50+ 0x00 , CMD_USB_SYSTEM_CONFIG_CURR_RSENSE = 0x0200 + 0x50+ 0x01 , CMD_USB_SYSTEM_CONFIG_VOLT_R1 = 0x0200 + 0x50+ 0x02 , CMD_USB_SYSTEM_CONFIG_VOLT_R2 = 0x0200 + 0x50+ 0x03 , CMD_USB_SYSTEM_CONFIG_SAVE = 0x0200 + 0x50+ 0x07 } |
| USB-only system configuration command identifiers. More... | |
AMU Command Definitions and SCPI Command Mappings.
This file defines all command IDs used by the AMU (Aerospace Measurement Unit) for both I2C and USB communication interfaces. Each command is mapped to specific SCPI strings in scpi.h to provide a standardized instrument control interface.
Commands are organized hierarchically with offset-based grouping:
Definition in file amu_commands.h.
| #define AMU_GET_CMD_BRANCH | ( | cmd | ) |
remove lower nibble (might not be used...)
Definition at line 84 of file amu_commands.h.
| #define AMU_GET_CMD_ROOT | ( | cmd | ) |
clear the lower nibble and the read bit
Definition at line 83 of file amu_commands.h.
| #define CMD_ADC_CH_OFFSET CMD_I2C_USB + 0x60 |
Definition at line 55 of file amu_commands.h.
| #define CMD_AUX_OFFSET CMD_I2C_USB + 0x50 |
Definition at line 54 of file amu_commands.h.
| #define CMD_DUT_OFFSET CMD_I2C_USB + 0x20 |
Definition at line 51 of file amu_commands.h.
| #define CMD_EXEC_OFFSET CMD_I2C_USB + 0x30 |
Definition at line 52 of file amu_commands.h.
| #define CMD_I2C_USB 0x0100 |
TODO.
Command structure is a single byte, wherein the highest bit determines whether the command is a read or write operation. The CMD_OFFSET is used when processing the command to indicate routing callbacks or the amu internal registers. Root command for I2C/USB commands
Definition at line 46 of file amu_commands.h.
| #define CMD_MEAS_CH_CMD_OFFSET CMD_I2C_USB + 0x70 |
Definition at line 56 of file amu_commands.h.
| #define CMD_READ (1<<CMD_RW_BIT) |
Definition at line 34 of file amu_commands.h.
| #define CMD_RW_BIT 7 |
Definition at line 33 of file amu_commands.h.
| #define CMD_SWEEP_OFFSET CMD_I2C_USB + 0x40 |
Definition at line 53 of file amu_commands.h.
| #define CMD_SYSTEM_LED_OFFSET CMD_I2C_USB + 0x10 |
Definition at line 50 of file amu_commands.h.
| #define CMD_SYSTEM_OFFSET CMD_I2C_USB + 0x00 |
Definition at line 49 of file amu_commands.h.
| #define CMD_USB_ADC_CURRENT_CMD_OFFSET CMD_USB_ONLY + 0x30 |
Definition at line 61 of file amu_commands.h.
| #define CMD_USB_ADC_VOLTAGE_CMD_OFFSET CMD_USB_ONLY + 0x20 |
Definition at line 60 of file amu_commands.h.
| #define CMD_USB_EEPROM_CMD_OFFSET CMD_USB_ONLY + 0x10 |
Definition at line 59 of file amu_commands.h.
| #define CMD_USB_ONLY 0x0200 |
Root command for USB only commands
Definition at line 47 of file amu_commands.h.
| #define CMD_USB_SWEEP_OFFSET CMD_USB_ONLY + 0x40 |
Definition at line 62 of file amu_commands.h.
| #define CMD_USB_SYSTEM_CONFIG_OFFSET CMD_USB_ONLY + 0x50 |
Definition at line 63 of file amu_commands.h.
| #define CMD_USB_SYSTEM_OFFSET CMD_USB_ONLY + 0x00 |
Definition at line 58 of file amu_commands.h.
| #define CMD_WRITE (0<<CMD_RW_BIT) |
Definition at line 35 of file amu_commands.h.
| enum CMD_t |
Definition at line 65 of file amu_commands.h.
USB-only current ADC command identifiers.
These commands provide direct current channel control and calibration. Extended functionality only available via USB interface.
Definition at line 1260 of file amu_commands.h.
USB-only voltage ADC command identifiers.
These commands provide direct voltage channel control and calibration. Extended functionality only available via USB interface.
Definition at line 1196 of file amu_commands.h.
| enum CMD_USB_EEPROM_t |
USB-only EEPROM command identifiers.
These commands provide direct EEPROM access for calibration data management. Only available via USB interface for security and data integrity.
Definition at line 1139 of file amu_commands.h.
| enum CMD_USB_SWEEP_t |
USB-only sweep command identifiers.
These commands provide USB-specific sweep functionality.
Definition at line 1322 of file amu_commands.h.
USB-only system configuration command identifiers.
These commands configure system-level hardware parameters and save configuration. Only available via USB for security and to prevent accidental misconfiguration.
Definition at line 1337 of file amu_commands.h.
| enum CMD_USB_SYSTEM_t |
USB-only system command identifiers.
These commands are only available via USB interface and provide extended system functionality not accessible over I2C.
Definition at line 1099 of file amu_commands.h.