mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
added auto comp disable feature
This commit is contained in:
@ -291,7 +291,7 @@
|
||||
#define VREF_COMP_MOD_REG (0x5C << 11)
|
||||
|
||||
#define VREF_COMP_MOD_OFST (0)
|
||||
#define VREF_COMP_MOD_MSK (0x00000FFF << VREF_COMP_OFST)
|
||||
#define VREF_COMP_MOD_MSK (0x00000FFF << VREF_COMP_MOD_OFST)
|
||||
#define VREF_COMP_MOD_ENABLE_OFST (31)
|
||||
#define VREF_COMP_MOD_ENABLE_MSK (0x00000FFF << VREF_COMP_MOD_ENABLE_OFST)
|
||||
|
||||
|
Binary file not shown.
BIN
slsDetectorSoftware/jungfrauDetectorServer/bin/jungfrauDetectorServerv3.0.1.1
Executable file
BIN
slsDetectorSoftware/jungfrauDetectorServer/bin/jungfrauDetectorServerv3.0.1.1
Executable file
Binary file not shown.
@ -395,6 +395,24 @@ int powerChip (int on){
|
||||
//return ((bus_r(CHIP_POWER_REG) & CHIP_POWER_STATUS_MSK) >> CHIP_POWER_STATUS_OFST);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int autoCompDisable(int on) {
|
||||
if(on != -1){
|
||||
if(on){
|
||||
cprintf(BLUE, "\n*** Auto comp disable mode: enabling ***\n");
|
||||
bus_w(VREF_COMP_MOD_REG, bus_r(VREF_COMP_MOD_REG) | VREF_COMP_MOD_ENABLE_MSK);
|
||||
}
|
||||
else{
|
||||
cprintf(BLUE, "\n*** Auto comp disable mode: disabling *** \n");
|
||||
bus_w(VREF_COMP_MOD_REG, bus_r(VREF_COMP_MOD_REG) & ~VREF_COMP_MOD_ENABLE_MSK);
|
||||
}
|
||||
}
|
||||
|
||||
return (bus_r(VREF_COMP_MOD_REG) & VREF_COMP_MOD_ENABLE_MSK);
|
||||
}
|
||||
|
||||
|
||||
void cleanFifos() {
|
||||
printf("\nClearing Acquisition Fifos\n");
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_ACQ_FIFO_CLR_MSK);
|
||||
@ -879,6 +897,11 @@ void setDAC(enum DACINDEX ind, int val, int imod, int mV, int retval[]){
|
||||
DAC_SERIAL_CLK_OUT_MSK, DAC_SERIAL_DIGITAL_OUT_MSK, DAC_SERIAL_DIGITAL_OUT_OFST);
|
||||
|
||||
dacValues[ind] = dacval;
|
||||
|
||||
if (ind == VREF_COMP) {
|
||||
bus_w (VREF_COMP_MOD_REG, (bus_r(VREF_COMP_MOD_REG) &~ (VREF_COMP_MOD_MSK)) // reset
|
||||
| ((val << VREF_COMP_MOD_OFST) & VREF_COMP_MOD_MSK)); // or it with value
|
||||
}
|
||||
}
|
||||
|
||||
printf("Getting DAC %d : ",ind);
|
||||
|
Reference in New Issue
Block a user