mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-19 09:31:07 +01:00
Jf: Electron collection mode (#983)
* electron collection mode for jungfrau. also removing the config chip when using register command * collectionMode: HOLE/ELECTRON (enum)
This commit is contained in:
Binary file not shown.
@@ -572,6 +572,7 @@ void setupDetector() {
|
||||
#endif
|
||||
setPedestalMode(DEFAULT_PEDESTAL_MODE, DEFAULT_PEDESTAL_FRAMES,
|
||||
DEFAULT_PEDESTAL_LOOPS);
|
||||
setElectronCollectionMode(DEFAULT_ELECTRON_COLLECTION_MODE);
|
||||
}
|
||||
|
||||
int resetToDefaultDacs(int hardReset) {
|
||||
@@ -2615,6 +2616,22 @@ void setPedestalMode(int enable, uint8_t frames, uint16_t loops) {
|
||||
}
|
||||
}
|
||||
|
||||
int getElectronCollectionMode() {
|
||||
return ((bus_r(DAQ_REG) & DAQ_ELCTRN_CLLCTN_MDE_MSK) >>
|
||||
DAQ_ELCTRN_CLLCTN_MDE_OFST);
|
||||
}
|
||||
|
||||
void setElectronCollectionMode(int enable) {
|
||||
LOG(logINFO,
|
||||
("Setting Collection Mode to %s\n", enable == 0 ? "Hole" : "Electron"));
|
||||
if (enable) {
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) | DAQ_ELCTRN_CLLCTN_MDE_MSK);
|
||||
} else {
|
||||
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_ELCTRN_CLLCTN_MDE_MSK);
|
||||
}
|
||||
configureChip();
|
||||
}
|
||||
|
||||
int getTenGigaFlowControl() {
|
||||
return ((bus_r(CONFIG_REG) & CONFIG_ETHRNT_FLW_CNTRL_MSK) >>
|
||||
CONFIG_ETHRNT_FLW_CNTRL_OFST);
|
||||
|
||||
@@ -37,28 +37,29 @@
|
||||
#define CONFIG_FILE ("config_jungfrau.txt")
|
||||
|
||||
/** Default Parameters */
|
||||
#define DEFAULT_NUM_FRAMES (100 * 1000 * 1000)
|
||||
#define DEFAULT_STARTING_FRAME_NUMBER (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_EXPTIME (10 * 1000) // ns
|
||||
#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns
|
||||
#define DEFAULT_DELAY (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_SETTINGS (GAIN0)
|
||||
#define DEFAULT_GAINMODE (DYNAMIC)
|
||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
|
||||
#define DEFAULT_NUM_STRG_CLLS (0)
|
||||
#define DEFAULT_STRG_CLL_STRT (0xf)
|
||||
#define DEFAULT_STRG_CLL_STRT_CHIP11 (0x3)
|
||||
#define DEFAULT_STRG_CLL_DLY (0)
|
||||
#define DEFAULT_FLIP_ROWS (0)
|
||||
#define DEFAULT_FILTER_RESISTOR (1) // higher resistor
|
||||
#define DEFAULT_FILTER_CELL (0)
|
||||
#define DEFAULT_PEDESTAL_MODE (0)
|
||||
#define DEFAULT_PEDESTAL_FRAMES (1)
|
||||
#define DEFAULT_PEDESTAL_LOOPS (1)
|
||||
#define DEFAULT_NUM_FRAMES (100 * 1000 * 1000)
|
||||
#define DEFAULT_STARTING_FRAME_NUMBER (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_EXPTIME (10 * 1000) // ns
|
||||
#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns
|
||||
#define DEFAULT_DELAY (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_SETTINGS (GAIN0)
|
||||
#define DEFAULT_GAINMODE (DYNAMIC)
|
||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
|
||||
#define DEFAULT_NUM_STRG_CLLS (0)
|
||||
#define DEFAULT_STRG_CLL_STRT (0xf)
|
||||
#define DEFAULT_STRG_CLL_STRT_CHIP11 (0x3)
|
||||
#define DEFAULT_STRG_CLL_DLY (0)
|
||||
#define DEFAULT_FLIP_ROWS (0)
|
||||
#define DEFAULT_FILTER_RESISTOR (1) // higher resistor
|
||||
#define DEFAULT_FILTER_CELL (0)
|
||||
#define DEFAULT_PEDESTAL_MODE (0)
|
||||
#define DEFAULT_PEDESTAL_FRAMES (1)
|
||||
#define DEFAULT_PEDESTAL_LOOPS (1)
|
||||
#define DEFAULT_ELECTRON_COLLECTION_MODE (0)
|
||||
|
||||
#define HIGHVOLTAGE_MIN (60)
|
||||
#define HIGHVOLTAGE_MAX (200)
|
||||
|
||||
Reference in New Issue
Block a user