CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches
CROSS_command_parser.h
Go to the documentation of this file.
1
2#include "stdint.h"
3#include "stdbool.h"
4
5 /// \file
6
7
8
9
10
11/*! \brief instr_NO_operation has the value of zero and the follwoing instructions are increased by one at each step.
12
13The last enum line, instr_Trimmer_setting, is not an instruction but the information of the total number of instructions.
14*/
16 //Basic system
17 instr_NO_operation , //!< NOP, the fw version is replayed
18 instr_Shut_Down_ON_OFF , //!< &micro;-controller can be maintained always ON
19 instr_inizializza_tutto_da_zero, //!< &micro;-controller is reset. The perifelal are all initialized.
20 //Detctor bias
21 instr_detector_Vbias_we_want_to_set , //!< The voltage we intend to set to the detector. This command does not apply the voltage.
22 instr_Vbias_to_be_set, //!< The voltage set with \b instr_detector_Vbias_we_want_to_set is set to the detector.
23 instr_Relays_driver_set_reset_channel, //!< Set / reset of the relais that manage the detectors.
24 instr_detector_scrittura_lettura_trimmer_bias, //!< Write /read to /from the trimmers for the detectors biases.
25//Preamplifier
26 instr_preamplifier_gain_low_high_set, //!< Set /reset of the large gain for the preamplifier
27 instr_preamplifier_temperature_meas, //!< Measure the preamplifier temperature
28 instr_preamplifier_memory, //!< Write /read the preamplifier EPROM
29 instr_ouput_offset_we_want_to_set, //!< Set the output offset to set channel per channel
30 instr_output_offset_to_be_set, //!< Adjust the ouput voltage that was previously set at #instr_ouput_offset_we_want_to_set
31 instr_preamplifier_scrittura_lettura_trimmer_offset, //!< Write /read to /from the trimmers for the preamplifier offset adjustment.
32//PGA managing
33 instr_PGA_gain_set, //!< Set the PGA gain value
34 instr_PGA_set_reset_pre_PGA_gain, //!< Set /reset of the first stage of PGA
35 instr_PGA_DAC_GAIN_CROSS, //!< Set the gain of the second stage of the PGA.
36//Errors
37 instr_ERROR_inspection, //!< quering about the presence of any error
38 instr_ERROR_echo_on_off, //!< if enabled, echo of the error via CAN as soon as the error is verified
39//Common use
40 instr_ADC_LETTURA , //!< ADC reading, the following byte from the CAN set the reading node
41 instr_readback_variables, //!< Variables Readback
42 instr_readback_node_voltages, //!< Nodes voltage read from external ADC
43//Expert use
44 instr_offset_trimmer_calibration, //!< fine and coarse trimmer calibration for ofset compensation
45 instr_DetBias_trimmer_calibration, //!< fine and coarse trimmer calibration for detector bias compensation
46 instr_EPROM_read_write, //!< read from preamplifier or mainboard or post frontend board EPROM
47 instr_connect_disconnect_mux_node, //!< select/deselect a node from the analog mux
48 instr_LED_ON_OFF, //!< LEDs can be switched ON/OFF for test and diagnostic
49 instr_periferal_reset, //!< I2C, SPI and CAN can be reset
50
51 The_total_number_of_instrucions, //!< This is the total numebr of instructions, not an instruction
52
53 //qui sotto da fare
54// instr_pre_PGA_gain , //!< Relay settings according to the second byte from the CAN
55// instr_PGA_GAIN , //!< .
56
57// instr_Power_supply_ON_OFF , //!< .
58// instr_OFFSET_ADJ , //!< .
59// instr_measure_pre_bias_coefficients , //!< .
60// instr_Some_parameters_to_set , //!< here some usefull parameters can be set, such as wait times, etc.
61// instr_ricalibrazione_scheda, //!< .
62// instr_Vbias_and_OFFSET_SET , //!< .
63// instr_Drift_compensation , //!< .
64
65// instr_Trimmer_setting,
66// instr_Vbias_set //!< .
67} ;
68
69
70
71
72/*! \brief Variables to readback
73
74The last enum line, instr_Trimmer_setting, is not an instruction but the information of the total number of instructions.
75*/
77 instr_detector_bias_variable, //!< detector set voltage vector
78 instr_offset_voltage_variable, //!< detector set voltage vector
79 instr_PGA_gain_variable //!< PGA gain vector
80};
81
instructions
instr_NO_operation has the value of zero and the follwoing instructions are increased by one at each ...
@ instr_Shut_Down_ON_OFF
µ-controller can be maintained always ON
@ instr_NO_operation
NOP, the fw version is replayed.
@ instr_offset_trimmer_calibration
fine and coarse trimmer calibration for ofset compensation
@ instr_preamplifier_memory
Write /read the preamplifier EPROM.
@ instr_PGA_DAC_GAIN_CROSS
Set the gain of the second stage of the PGA.
@ instr_PGA_gain_set
Set the PGA gain value.
@ instr_detector_Vbias_we_want_to_set
The voltage we intend to set to the detector. This command does not apply the voltage.
@ instr_readback_node_voltages
Nodes voltage read from external ADC.
@ instr_ERROR_inspection
quering about the presence of any error
@ instr_LED_ON_OFF
LEDs can be switched ON/OFF for test and diagnostic.
@ instr_output_offset_to_be_set
Adjust the ouput voltage that was previously set at instr_ouput_offset_we_want_to_set.
@ instr_Vbias_to_be_set
The voltage set with instr_detector_Vbias_we_want_to_set is set to the detector.
@ instr_ADC_LETTURA
ADC reading, the following byte from the CAN set the reading node.
@ instr_preamplifier_scrittura_lettura_trimmer_offset
Write /read to /from the trimmers for the preamplifier offset adjustment.
@ instr_preamplifier_temperature_meas
Measure the preamplifier temperature.
@ instr_EPROM_read_write
read from preamplifier or mainboard or post frontend board EPROM
@ instr_connect_disconnect_mux_node
select/deselect a node from the analog mux
@ instr_preamplifier_gain_low_high_set
Set /reset of the large gain for the preamplifier.
@ instr_inizializza_tutto_da_zero
µ-controller is reset. The perifelal are all initialized.
@ instr_ERROR_echo_on_off
if enabled, echo of the error via CAN as soon as the error is verified
@ instr_ouput_offset_we_want_to_set
Set the output offset to set channel per channel.
@ instr_detector_scrittura_lettura_trimmer_bias
Write /read to /from the trimmers for the detectors biases.
@ instr_Relays_driver_set_reset_channel
Set / reset of the relais that manage the detectors.
@ instr_readback_variables
Variables Readback
@ instr_DetBias_trimmer_calibration
fine and coarse trimmer calibration for detector bias compensation
@ instr_periferal_reset
I2C, SPI and CAN can be reset.
@ instr_PGA_set_reset_pre_PGA_gain
Set /reset of the first stage of PGA.
@ The_total_number_of_instrucions
This is the total numebr of instructions, not an instruction.
instr_variable_to_read
Variables to readback.
@ instr_offset_voltage_variable
detector set voltage vector
@ instr_PGA_gain_variable
PGA gain vector.
@ instr_detector_bias_variable
detector set voltage vector