mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
jungfrau server: fixed the settings for gain2 stages
This commit is contained in:
parent
03e781a0ac
commit
c9675d111a
@ -299,21 +299,21 @@
|
|||||||
/** DAQ Register */
|
/** DAQ Register */
|
||||||
#define DAQ_REG (0x5D << MEM_MAP_SHIFT)
|
#define DAQ_REG (0x5D << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define DAQ_SETTINGS_MSK (DAQ_HIGH_GAIN_MSK | DAQ_FIX_GAIN_STG_1_MSK | DAQ_FIX_GAIN_STG_2_MSK | DAQ_FRCE_SWTCH_GAIN_STG_1_MSK | DAQ_FRCE_SWTCH_GAIN_STG_2_MSK)
|
#define DAQ_SETTINGS_MSK (DAQ_HIGH_GAIN_MSK | DAQ_FIX_GAIN_MSK | DAQ_FRCE_SWTCH_GAIN_MSK)
|
||||||
#define DAQ_HIGH_GAIN_OFST (0)
|
#define DAQ_HIGH_GAIN_OFST (0)
|
||||||
#define DAQ_HIGH_GAIN_MSK (0x00000001 << DAQ_HIGH_GAIN_OFST)
|
#define DAQ_HIGH_GAIN_MSK (0x00000001 << DAQ_HIGH_GAIN_OFST)
|
||||||
#define DAQ_FIX_GAIN_STG_1_OFST (1)
|
#define DAQ_FIX_GAIN_OFST (1)
|
||||||
#define DAQ_FIX_GAIN_STG_1_MSK (0x00000001 << DAQ_FIX_GAIN_STG_1_OFST)
|
#define DAQ_FIX_GAIN_MSK (0x00000003 << DAQ_FIX_GAIN_OFST)
|
||||||
#define DAQ_FIX_GAIN_STG_2_OFST (2)
|
#define DAQ_FIX_GAIN_STG_1_VAL ((0x1 << DAQ_FIX_GAIN_OFST) & DAQ_FIX_GAIN_MSK)
|
||||||
#define DAQ_FIX_GAIN_STG_2_MSK (0x00000001 << DAQ_FIX_GAIN_STG_2_OFST)
|
#define DAQ_FIX_GAIN_STG_2_VAL ((0x3 << DAQ_FIX_GAIN_OFST) & DAQ_FIX_GAIN_MSK)
|
||||||
#define DAQ_CMP_RST_OFST (4)
|
#define DAQ_CMP_RST_OFST (4)
|
||||||
#define DAQ_CMP_RST_MSK (0x00000001 << DAQ_CMP_RST_OFST)
|
#define DAQ_CMP_RST_MSK (0x00000001 << DAQ_CMP_RST_OFST)
|
||||||
#define DAQ_STRG_CELL_SLCT_OFST (8)
|
#define DAQ_STRG_CELL_SLCT_OFST (8)
|
||||||
#define DAQ_STRG_CELL_SLCT_MSK (0x0000000F << DAQ_STRG_CELL_SLCT_OFST)
|
#define DAQ_STRG_CELL_SLCT_MSK (0x0000000F << DAQ_STRG_CELL_SLCT_OFST)
|
||||||
#define DAQ_FRCE_SWTCH_GAIN_STG_1_OFST (12)
|
#define DAQ_FRCE_SWTCH_GAIN_OFST (12)
|
||||||
#define DAQ_FRCE_SWTCH_GAIN_STG_1_MSK (0x00000001 << DAQ_FRCE_SWTCH_GAIN_STG_1_OFST)
|
#define DAQ_FRCE_SWTCH_GAIN_MSK (0x00000003 << DAQ_FRCE_SWTCH_GAIN_OFST)
|
||||||
#define DAQ_FRCE_SWTCH_GAIN_STG_2_OFST (13)
|
#define DAQ_FRCE_GAIN_STG_1_VAL ((0x1 << DAQ_FRCE_SWTCH_GAIN_OFST) & DAQ_FRCE_SWTCH_GAIN_MSK)
|
||||||
#define DAQ_FRCE_SWTCH_GAIN_STG_2_MSK (0x00000001 << DAQ_FRCE_SWTCH_GAIN_STG_2_OFST)
|
#define DAQ_FRCE_GAIN_STG_2_VAL ((0x3 << DAQ_FRCE_SWTCH_GAIN_OFST) & DAQ_FRCE_SWTCH_GAIN_MSK)
|
||||||
#define DAQ_ELCTRN_CLLCTN_MDE_OFST (14)
|
#define DAQ_ELCTRN_CLLCTN_MDE_OFST (14)
|
||||||
#define DAQ_ELCTRN_CLLCTN_MDE_MSK (0x00000001 << DAQ_ELCTRN_CLLCTN_MDE_OFST)
|
#define DAQ_ELCTRN_CLLCTN_MDE_MSK (0x00000001 << DAQ_ELCTRN_CLLCTN_MDE_OFST)
|
||||||
#define DAQ_G2_CNNT_OFST (15)
|
#define DAQ_G2_CNNT_OFST (15)
|
||||||
|
Binary file not shown.
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
|
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
|
||||||
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||||
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||||
Repsitory UUID: 5ff2e8606011ef6e37b5cfe6254acf80eaa50e5b
|
Repsitory UUID: 03e781a0ac53cb73af5d00003a131383125ab40f
|
||||||
Revision: 137
|
Revision: 141
|
||||||
Branch: jungfraunew
|
Branch: jungfraunew
|
||||||
Last Changed Author: Dhanya_Thattil
|
Last Changed Author: Dhanya_Thattil
|
||||||
Last Changed Rev: 3771
|
Last Changed Rev: 3776
|
||||||
Last Changed Date: 2018-04-13 11:25:18.000000002 +0200 ./RegisterDefs.h
|
Last Changed Date: 2018-04-23 16:06:57.000000002 +0200 ./RegisterDefs.h
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
||||||
#define GITREPUUID "5ff2e8606011ef6e37b5cfe6254acf80eaa50e5b"
|
#define GITREPUUID "03e781a0ac53cb73af5d00003a131383125ab40f"
|
||||||
#define GITAUTH "Dhanya_Thattil"
|
#define GITAUTH "Dhanya_Thattil"
|
||||||
#define GITREV 0x3771
|
#define GITREV 0x3776
|
||||||
#define GITDATE 0x20180413
|
#define GITDATE 0x20180423
|
||||||
#define GITBRANCH "jungfraunew"
|
#define GITBRANCH "jungfraunew"
|
||||||
|
@ -829,22 +829,22 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
|
|||||||
break;
|
break;
|
||||||
case FIXGAIN1:
|
case FIXGAIN1:
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FIX_GAIN_STG_1_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FIX_GAIN_STG_1_VAL);
|
||||||
printf("\nConfigured settings - Fix Gain 1, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
printf("\nConfigured settings - Fix Gain 1, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
||||||
break;
|
break;
|
||||||
case FIXGAIN2:
|
case FIXGAIN2:
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FIX_GAIN_STG_2_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FIX_GAIN_STG_2_VAL);
|
||||||
printf("\nConfigured settings - Fix Gain 2, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
printf("\nConfigured settings - Fix Gain 2, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
||||||
break;
|
break;
|
||||||
case FORCESWITCHG1:
|
case FORCESWITCHG1:
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FRCE_SWTCH_GAIN_STG_1_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FRCE_GAIN_STG_1_VAL);
|
||||||
printf("\nConfigured settings - Force Switch Gain 1, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
printf("\nConfigured settings - Force Switch Gain 1, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
||||||
break;
|
break;
|
||||||
case FORCESWITCHG2:
|
case FORCESWITCHG2:
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_SETTINGS_MSK);
|
||||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FRCE_SWTCH_GAIN_STG_2_MSK);
|
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_FRCE_GAIN_STG_2_VAL);
|
||||||
printf("\nConfigured settings - Force Switch Gain 2, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
printf("\nConfigured settings - Force Switch Gain 2, DAQ Reg: 0x%x\n", bus_r(DAQ_REG));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -865,22 +865,22 @@ enum detectorSettings getSettings(){
|
|||||||
uint32_t val = bus_r(DAQ_REG);
|
uint32_t val = bus_r(DAQ_REG);
|
||||||
printf("\nGetting Settings\n Reading DAQ Register :0x%x\n", val);
|
printf("\nGetting Settings\n Reading DAQ Register :0x%x\n", val);
|
||||||
|
|
||||||
if (val & DAQ_FRCE_SWTCH_GAIN_STG_2_MSK) {
|
if (val & DAQ_FRCE_GAIN_STG_2_VAL) {
|
||||||
thisSettings = FORCESWITCHG2;
|
thisSettings = FORCESWITCHG2;
|
||||||
printf("Settings read: FORCESWITCHG2\n");
|
printf("Settings read: FORCESWITCHG2\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (val & DAQ_FRCE_SWTCH_GAIN_STG_1_MSK) {
|
else if (val & DAQ_FRCE_GAIN_STG_1_VAL) {
|
||||||
thisSettings = FORCESWITCHG1;
|
thisSettings = FORCESWITCHG1;
|
||||||
printf("Settings read: FORCESWITCHG1\n");
|
printf("Settings read: FORCESWITCHG1\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (val & DAQ_FIX_GAIN_STG_2_MSK) {
|
else if (val & DAQ_FIX_GAIN_STG_2_VAL) {
|
||||||
thisSettings = FIXGAIN2;
|
thisSettings = FIXGAIN2;
|
||||||
printf("Settings read: FIXGAIN2\n");
|
printf("Settings read: FIXGAIN2\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (val & DAQ_FIX_GAIN_STG_1_MSK) {
|
else if (val & DAQ_FIX_GAIN_STG_1_VAL) {
|
||||||
thisSettings = FIXGAIN1;
|
thisSettings = FIXGAIN1;
|
||||||
printf("Settings read: FIXGAIN1\n");
|
printf("Settings read: FIXGAIN1\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user