mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
jungfrau: partial readout in firmware is not yet done, circumventing this
This commit is contained in:
parent
b37db1de72
commit
fc35b2b0de
Binary file not shown.
@ -52,6 +52,9 @@ int detPos[4] = {};
|
|||||||
int chipVersion = 10; // (1.0)
|
int chipVersion = 10; // (1.0)
|
||||||
int chipConfigured = 0;
|
int chipConfigured = 0;
|
||||||
|
|
||||||
|
// until firmware is done
|
||||||
|
int temp_partialReadout = 512;
|
||||||
|
|
||||||
int isInitCheckDone() { return initCheckDone; }
|
int isInitCheckDone() { return initCheckDone; }
|
||||||
|
|
||||||
int getInitResult(char **mess) {
|
int getInitResult(char **mess) {
|
||||||
@ -1606,6 +1609,10 @@ int setPartialReadout(int value) {
|
|||||||
if (value < 0 || (value % PARTIAL_READOUT_MULTIPLE != 0))
|
if (value < 0 || (value % PARTIAL_READOUT_MULTIPLE != 0))
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
|
||||||
|
// will be replaced when firmware is fixed
|
||||||
|
temp_partialReadout = value;
|
||||||
|
return OK;
|
||||||
|
|
||||||
// regval is numpackets - 1
|
// regval is numpackets - 1
|
||||||
int regval = (value / PARTIAL_READOUT_MULTIPLE) - 1;
|
int regval = (value / PARTIAL_READOUT_MULTIPLE) - 1;
|
||||||
uint32_t addr = PARTIAL_READOUT_REG;
|
uint32_t addr = PARTIAL_READOUT_REG;
|
||||||
@ -1624,10 +1631,14 @@ int setPartialReadout(int value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getPartialReadout() {
|
int getPartialReadout() {
|
||||||
|
|
||||||
|
// will be replaced when firmware is fixed
|
||||||
|
return temp_partialReadout;
|
||||||
|
|
||||||
int enable = (bus_r(PARTIAL_READOUT_REG) & PARTIAL_READOUT_ENBL_MSK);
|
int enable = (bus_r(PARTIAL_READOUT_REG) & PARTIAL_READOUT_ENBL_MSK);
|
||||||
int regval = ((bus_r(PARTIAL_READOUT_REG) & PARTIAL_READOUT_NUM_ROWS_MSK) >> PARTIAL_READOUT_NUM_ROWS_OFST);
|
int regval = ((bus_r(PARTIAL_READOUT_REG) & PARTIAL_READOUT_NUM_ROWS_MSK) >> PARTIAL_READOUT_NUM_ROWS_OFST);
|
||||||
|
|
||||||
int maxRegval = (MAX_ROWS_PER_READOUT/ PARTIAL_READOUT_MULTIPLE) - 1;
|
int maxRegval = (MAX_ROWS_PER_READOUT/ PARTIAL_READOUT_MULTIPLE) - 1;
|
||||||
if ((regval == maxRegval && enable) || (regval != maxRegval && !enable)) {
|
if ((regval == maxRegval && enable) || (regval != maxRegval && !enable)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
#define APIGUI 0x210816
|
#define APIGUI 0x210816
|
||||||
#define APIGOTTHARD 0x210820
|
#define APIGOTTHARD 0x210820
|
||||||
#define APIGOTTHARD2 0x210820
|
#define APIGOTTHARD2 0x210820
|
||||||
#define APIJUNGFRAU 0x210820
|
|
||||||
#define APIMYTHEN3 0x210820
|
#define APIMYTHEN3 0x210820
|
||||||
#define APIEIGER 0x210820
|
#define APIEIGER 0x210820
|
||||||
#define APICTB 0x210820
|
#define APICTB 0x210820
|
||||||
#define APIMOENCH 0x210820
|
#define APIMOENCH 0x210820
|
||||||
|
#define APIJUNGFRAU 0x210820
|
||||||
|
Loading…
x
Reference in New Issue
Block a user