# This file is part of Pymepix## In all scientific work using Pymepix, please reference it as## A. F. Al-Refaie, M. Johny, J. Correa, D. Pennicard, P. Svihra, A. Nomerotski, S. Trippel, and J. Küpper:# "PymePix: a python library for SPIDR readout of Timepix3", J. Inst. 14, P10003 (2019)# https://doi.org/10.1088/1748-0221/14/10/P10003# https://arxiv.org/abs/1905.07999## Pymepix is free software: you can redistribute it and/or modify it under the terms of the GNU# General Public License as published by the Free Software Foundation, either version 3 of the# License, or (at your option) any later version.## This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without# even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# General Public License for more details.## You should have received a copy of the GNU General Public License along with this program. If not,# see <https://www.gnu.org/licenses/>."""This module contains a list of all (found) commands for the SPIDR board"""fromenumimportIntEnum
[docs]classSpidrCmds(IntEnum):"""A class that packages all the commands under a single name"""CMD_NOP=0x000# General: moduleCMD_GET_SOFTWVERSION=0x901CMD_GET_FIRMWVERSION=0x902CMD_GET_HEADERFILTER=0x905CMD_SET_HEADERFILTER=0x906CMD_RESET_MODULE=0x907CMD_SET_BUSY=0x908CMD_CLEAR_BUSY=0x909CMD_SET_LOGLEVEL=0x90ACMD_DISPLAY_INFO=0x90BCMD_SET_TIMEOFDAY=0x90CCMD_GET_DEVICECOUNT=0x90D# CMD_GET_PORTCOUNT =0x90E #### OBSOLETECMD_GET_BOARDID=0x90ECMD_GET_CHIPBOARDID=0x90F# Configuration: devicesCMD_GET_DEVICEID=0x110CMD_GET_DEVICEIDS=0x111CMD_GET_IPADDR_SRC=0x112CMD_SET_IPADDR_SRC=0x113CMD_GET_IPADDR_DEST=0x114CMD_SET_IPADDR_DEST=0x115# CMD_GET_DEVICEPORTS =0x115# CMD_SET_DEVICEPORT =0x116CMD_GET_DEVICEPORT=0x116CMD_GET_SERVERPORT=0x117# CMD_GET_SERVERPORTS =0x118CMD_SET_SERVERPORT=0x119CMD_GET_DAC=0x11ACMD_SET_DAC=0x11BCMD_SET_DACS_DFLT=0x11FCMD_CONFIG_CTPR=0x120CMD_SET_CTPR=0x121CMD_GET_CTPR=0x122CMD_SET_CTPR_LEON=0x123CMD_RESET_DEVICE=0x124CMD_RESET_DEVICES=0x125CMD_REINIT_DEVICE=0x126CMD_REINIT_DEVICES=0x127CMD_GET_EFUSES=0x128# ifdef CERN_PROBESTATIONCMD_BURN_EFUSE=0x129# endif# Configuration: pixelsCMD_SET_PIXCONF=0x22ACMD_GET_PIXCONF=0x22DCMD_RESET_PIXELS=0x22E# Configuration: devices (continued)CMD_GET_TPPERIODPHASE=0x330CMD_SET_TPPERIODPHASE=0x331CMD_SET_TPNUMBER=0x332CMD_GET_TPNUMBER=0x333CMD_GET_GENCONFIG=0x334CMD_SET_GENCONFIG=0x335CMD_GET_PLLCONFIG=0x336CMD_SET_PLLCONFIG=0x337CMD_SET_SENSEDAC=0x338CMD_SET_EXTDAC=0x33ACMD_UPLOAD_PACKET=0x33BCMD_GET_OUTBLOCKCONFIG=0x33CCMD_SET_OUTBLOCKCONFIG=0x33DCMD_GET_SLVSCONFIG=0x33ECMD_SET_SLVSCONFIG=0x33F# TriggerCMD_GET_TRIGCONFIG=0x440CMD_SET_TRIGCONFIG=0x441CMD_AUTOTRIG_START=0x442CMD_AUTOTRIG_STOP=0x443# Data-acquisitionCMD_SEQ_READOUT=0x445CMD_DDRIVEN_READOUT=0x446CMD_PAUSE_READOUT=0x447# MonitoringCMD_GET_ADC=0x548CMD_GET_REMOTETEMP=0x549CMD_GET_LOCALTEMP=0x54ACMD_GET_AVDD=0x54BCMD_GET_DVDD=0x54CCMD_GET_AVDD_NOW=0x54DCMD_GET_SPIDR_ADC=0x54ECMD_GET_DVDD_NOW=0x54F# Configuration: timerCMD_RESTART_TIMERS=0x550CMD_RESET_TIMER=0x551CMD_GET_TIMER=0x552CMD_SET_TIMER=0x553# Trigger (continued)CMD_GET_SHUTTERSTART=0x554CMD_GET_SHUTTEREND=0x555CMD_GET_EXTSHUTTERCNTR=0x556CMD_GET_SHUTTERCNTR=0x557CMD_RESET_COUNTERS=0x558# Configuration: devices (continued)CMD_GET_PWRPULSECONFIG=0x55BCMD_SET_PWRPULSECONFIG=0x55CCMD_PWRPULSE_ENA=0x55DCMD_TPX_POWER_ENA=0x55ECMD_BIAS_SUPPLY_ENA=0x55FCMD_SET_BIAS_ADJUST=0x560CMD_DECODERS_ENA=0x561CMD_SET_OUTPUTMASK=0x562CMD_SET_READOUTSPEED=0x563CMD_GET_READOUTSPEED=0x564# Configuration: timer (continued)CMD_T0_SYNC=0x565# Monitoring (continued)CMD_GET_FPGATEMP=0x568CMD_GET_FANSPEED=0x569CMD_SET_FANSPEED=0x56ACMD_SELECT_CHIPBOARD=0x56BCMD_GET_VDD=0x56CCMD_GET_VDD_NOW=0x56DCMD_GET_HUMIDITY=0x56ECMD_GET_PRESSURE=0x56F# Configuration: non-volatile onboard storageCMD_STORE_ADDRPORTS=0x670CMD_STORE_DACS=0x671CMD_STORE_REGISTERS=0x672CMD_STORE_PIXCONF=0x673CMD_ERASE_ADDRPORTS=0x674CMD_ERASE_DACS=0x675CMD_ERASE_REGISTERS=0x676CMD_ERASE_PIXCONF=0x677CMD_VALID_ADDRPORTS=0x678CMD_VALID_DACS=0x679CMD_VALID_REGISTERS=0x67ACMD_VALID_PIXCONF=0x67BCMD_STORE_STARTOPTS=0x67CCMD_GET_STARTOPTS=0x67DCMD_READ_FLASH=0x67ECMD_WRITE_FLASH=0x67F# OtherCMD_GET_GPIO=0x780CMD_SET_GPIO=0x781CMD_SET_GPIO_PIN=0x782CMD_GET_SPIDRREG=0x783CMD_SET_SPIDRREG=0x784CMD_SET_CHIPBOARDID=0x785CMD_SET_BOARDID=0x786# Reply bit: set in the reply message in the command identifierCMD_REPLY=0x00010000# No-reply bit: set in the command message in the command identifier# indicating to the SPIDR server that no reply is expected# (to speed up certain operations, such as pixel configuration uploads)CMD_NOREPLY=0x00080000CMD_MASK=0x0000FFFF