jungfrau server: chip configuration only for chip v 1.1

This commit is contained in:
maliakal_d 2021-07-27 18:16:30 +02:00
parent 8cc9cd1c75
commit 7535ea315b
6 changed files with 14 additions and 9 deletions

View File

@ -370,7 +370,7 @@ class Detector(CppDetectorApi):
Note
----
[Moench] Default is disabled. \n
[Jungfrau] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (if chipv1.1 and board v2.0).\n
[Jungfrau] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1).\n
[Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail.
"""
return self.getPowerChip()

View File

@ -387,6 +387,7 @@ void setupDetector() {
for (int i = 0; i < NUM_CLOCKS; ++i) {
clkPhase[i] = 0;
}
chipConfigured = 0;
#ifdef VIRTUAL
sharedMemory_setStatus(IDLE);
#endif
@ -1440,9 +1441,12 @@ int isChipConfigured() {
}
void configureChip() {
// only for chipv1.1
if (chipVersion == 11) {
LOG(logINFOBLUE, ("Configuring chip\n"));
bus_w(CONFIG_V11_REG, bus_r(CONFIG_V11_REG) & CONFIG_V11_WR_CHIP_CNFG_MSK);
chipConfigured = 1;
}
}

View File

@ -3,8 +3,8 @@
#include "sls/sls_detector_defs.h"
#define MIN_REQRD_VRSN_T_RD_API 0x171220
#define REQRD_FRMWRE_VRSN_BOARD2 0x210621 // 1.0 pcb
#define REQRD_FRMWRE_VRSN 0x210622 // 2.0 pcb
#define REQRD_FRMWRE_VRSN_BOARD2 0x210621 // 1.0 pcb (version = 010)
#define REQRD_FRMWRE_VRSN 0x210622 // 2.0 pcb (version = 011)
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)

View File

@ -1695,7 +1695,8 @@ int acquire(int blocking, int file_des) {
// only set
if (Server_VerifyLock() == OK) {
#ifdef JUNGFRAUD
if (!isChipConfigured()) {
// chipv1.1 has to be configured before acquisition
if (getChipVersion() == 11 && !isChipConfigured()) {
ret = FAIL;
strcpy(mess,
"Could not start acquisition. Chip is not configured.\n");

View File

@ -383,7 +383,7 @@ class Detector {
* [Moench] Default is disabled. \n
* [Jungfrau] Default is disabled. Get will return power status. Can be off
* if temperature event occured (temperature over temp_threshold with
* temp_control enabled. Will configure chip (if chipv1.1 and board v2.0)\n [Mythen3][Gotthard2] Default is 1. If module not
* temp_control enabled. Will configure chip (only chip v1.1)\n [Mythen3][Gotthard2] Default is 1. If module not
* connected or wrong module, powerchip will fail.
*/
void setPowerChip(bool on, Positions pos = {});

View File

@ -1315,7 +1315,7 @@ class CmdProxy {
"the chip. \n\t[Moench] Default is 0. \n\t[Jungfrau] Default is 0. Get "
"will return power status. Can be off if temperature event occured "
"(temperature over temp_threshold with temp_control "
"enabled. Will configure chip (if chipv1.1 and board v2.0)\n\t[Mythen3][Gotthard2] Default is 1. If module not "
"enabled. Will configure chip (only chip v1.1)\n\t[Mythen3][Gotthard2] Default is 1. If module not "
"connected or wrong module, powerchip will fail.");
INTEGER_COMMAND_VEC_ID(