mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
jungfrau: special settings and configure chip if powered on (1.1 chip)
This commit is contained in:
@ -883,18 +883,21 @@ enum detectorSettings setSettings(enum detectorSettings sett) {
|
||||
if (sett == UNINITIALIZED)
|
||||
return thisSettings;
|
||||
|
||||
int *specialDacValues[] = 0;
|
||||
// set settings
|
||||
switch (sett) {
|
||||
case DYNAMICGAIN:
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||
LOG(logINFO,
|
||||
("Set settings - Dyanmic Gain, DAQ Reg: 0x%x\n", bus_r(DAQ_REG)));
|
||||
specialDacValues = SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS;
|
||||
break;
|
||||
case DYNAMICHG0:
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FIX_GAIN_HIGHGAIN_VAL);
|
||||
LOG(logINFO, ("Set settings - Dyanmic High Gain 0, DAQ Reg: 0x%x\n",
|
||||
bus_r(DAQ_REG)));
|
||||
specialDacValues = SPECIAL_DEFAULT_DYNAMICHG0_GAIN_VALS;
|
||||
break;
|
||||
/*
|
||||
case FIXGAIN1:
|
||||
@ -930,6 +933,17 @@ enum detectorSettings setSettings(enum detectorSettings sett) {
|
||||
|
||||
thisSettings = sett;
|
||||
|
||||
// set special dacs to defined values
|
||||
int *specialDacs[] = {SPECIALDACINDEX};
|
||||
for (int i = 0; i < NSPECIALDACS; ++i) {
|
||||
setDAC(specialDacs[i], specialDacValues[i], 0);
|
||||
}
|
||||
|
||||
// if chip 1.1, and power chip on, configure chip
|
||||
if (getChipVersion() == 11 && powerChip(-1)) {
|
||||
configureChip();
|
||||
}
|
||||
|
||||
return getSettings();
|
||||
}
|
||||
|
||||
|
@ -63,9 +63,10 @@ enum DACINDEX {
|
||||
420 /* J_VREF_COMP */ \
|
||||
};
|
||||
|
||||
#define NSPECIALDACS (3)
|
||||
#define SPECIALDACINDEX {J_VB_COMP, J_VREF_DS, J_VREF_COMP};
|
||||
#define SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS {};
|
||||
#define NSPECIALDACS (3)
|
||||
#define SPECIALDACINDEX {J_VB_COMP, J_VREF_DS, J_VREF_COMP};
|
||||
#define SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS {1000, 500, 400};
|
||||
#define SPECIAL_DEFAULT_DYNAMICHG0_GAIN_VALS {1500, 550, 450};
|
||||
|
||||
enum NETWORKINDEX { TXN_FRAME, FLOWCTRL_10G };
|
||||
enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
|
||||
|
Reference in New Issue
Block a user