mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
powerchip for mythen3
This commit is contained in:
parent
705ddb7f42
commit
7de9401bc7
@ -69,6 +69,8 @@
|
||||
// #define CONTROL_MMRY_RST_MSK (0x00000001 << CONTROL_MMRY_RST_OFST)
|
||||
#define CONTROL_CLR_ACQSTN_FIFO_OFST (14)
|
||||
#define CONTROL_CLR_ACQSTN_FIFO_MSK (0x00000001 << CONTROL_CLR_ACQSTN_FIFO_OFST)
|
||||
#define CONTROL_PWR_CHIP_OFST (31)
|
||||
#define CONTROL_PWR_CHIP_MSK (0x00000001 << CONTROL_PWR_CHIP_OFST)
|
||||
|
||||
/* Pattern IO Control 64 bit register */
|
||||
#define PATTERN_IO_CTRL_LSB_REG (0x22 * REG_OFFSET + BASE_CONTROL)
|
||||
|
Binary file not shown.
@ -888,6 +888,20 @@ void setPatternLoop(int level, int *startAddr, int *stopAddr, int *nLoop) {
|
||||
}
|
||||
}
|
||||
|
||||
int powerChip (int on){
|
||||
if(on != -1){
|
||||
if(on){
|
||||
FILE_LOG(logINFO, ("Powering chip: on\n"));
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_PWR_CHIP_MSK);
|
||||
}
|
||||
else{
|
||||
FILE_LOG(logINFO, ("Powering chip: off\n"));
|
||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_PWR_CHIP_MSK);
|
||||
}
|
||||
}
|
||||
|
||||
return ((bus_r(CONTROL_REG) & CONTROL_PWR_CHIP_MSK) >> CONTROL_PWR_CHIP_OFST);
|
||||
}
|
||||
|
||||
|
||||
/* aquisition */
|
||||
|
@ -425,6 +425,7 @@ uint64_t writePatternWord(int addr, uint64_t word);
|
||||
int setPatternWaitAddress(int level, int addr);
|
||||
uint64_t setPatternWaitTime(int level, uint64_t t);
|
||||
void setPatternLoop(int level, int *startAddr, int *stopAddr, int *nLoop);
|
||||
int powerChip (int on);
|
||||
|
||||
|
||||
#elif GOTTHARD2D
|
||||
|
@ -3567,7 +3567,7 @@ int power_chip(int file_des) {
|
||||
return printSocketReadError();
|
||||
FILE_LOG(logDEBUG1, ("Powering chip to %d\n", arg));
|
||||
|
||||
#if (!defined(JUNGFRAUD)) && (!defined(MOENCHD))
|
||||
#if (!defined(JUNGFRAUD)) && (!defined(MOENCHD)) && (!defined(MYTHEN3D))
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// set & get
|
||||
|
@ -885,7 +885,6 @@ class CmdProxy {
|
||||
std::string Quad(int action);
|
||||
/* Jungfrau Specific */
|
||||
std::string TemperatureEvent(int action);
|
||||
std::string PowerChip(int action);
|
||||
/* Gotthard Specific */
|
||||
std::string ROI(int action);
|
||||
std::string ClearROI(int action);
|
||||
@ -1424,7 +1423,7 @@ class CmdProxy {
|
||||
"[0, 1]\n\t[Jungfrau] Temperature control enable. Default is 0 (disabled). If temperature crosses threshold temperature and temperature control is enabled, power to chip will be switched off and temperature event occurs. To power on chip again, temperature has to be less than threshold temperature and temperature event has to be cleared.");
|
||||
|
||||
INTEGER_COMMAND(powerchip, getPowerChip, setPowerChip, std::stoi,
|
||||
"[0, 1]\n\t[Jungfrau] Power the chip. Default 0. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled.");
|
||||
"[0, 1]\n\t[Jungfrau][Mythen3] Power the chip. Default 0. \n\t[Jungfrau] Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled.");
|
||||
|
||||
INTEGER_COMMAND(auto_comp_disable, getAutoCompDisable, setAutoCompDisable, std::stoi,
|
||||
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. Default 0 or this mode disabled(comparator enabled throughout). 1 enables mode. 0 disables mode. This mode disables the on-chip gain switching comparator automatically after 93.75% of exposure time (only for longer than 100us).");
|
||||
|
@ -7,6 +7,6 @@
|
||||
#define APIJUNGFRAU 0x191105
|
||||
#define APIGOTTHARD 0x191105
|
||||
#define APIGOTTHARD2 0x191105
|
||||
#define APIMYTHEN3 0x191105
|
||||
#define APICTB 0x191105
|
||||
#define APIEIGER 0x191105
|
||||
#define APIMYTHEN3 0x191106
|
||||
|
Loading…
x
Reference in New Issue
Block a user