mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
gotthard2, mythen3: firmware type check added, others: minor print
This commit is contained in:
parent
1d2f4a8af0
commit
2cb09a590a
Binary file not shown.
@ -192,7 +192,7 @@ int checkType() {
|
||||
uint32_t expectedType = (((FPGA_VERSION_DTCTR_TYP_CTB_VAL) & FPGA_VERSION_DTCTR_TYP_MSK) >> FPGA_VERSION_DTCTR_TYP_OFST);
|
||||
|
||||
if (type != expectedType) {
|
||||
FILE_LOG(logERROR, ("(Type Fail) - This is not a Chip Test Board Server (read %d, expected %d)\n",
|
||||
FILE_LOG(logERROR, ("(Type Fail) - This is not a Chip Test Board firmware (read %d, expected %d)\n",
|
||||
type, expectedType));
|
||||
return FAIL;
|
||||
}
|
||||
|
Binary file not shown.
@ -85,7 +85,7 @@ void basictests() {
|
||||
return;
|
||||
}
|
||||
// does check only if flag is 0 (by default), set by command line
|
||||
if ((!debugflag) && ((testFpga() == FAIL) || (testBus() == FAIL))) {
|
||||
if ((!debugflag) && ((checkType() == FAIL) || (testFpga() == FAIL) || (testBus() == FAIL))) {
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Dangerous to continue. (Firmware version:0x%llx) \n", getFirmwareVersion());
|
||||
FILE_LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
@ -172,7 +172,7 @@ int checkType() {
|
||||
#endif
|
||||
u_int32_t type = ((bus_r(FPGA_VERSION_REG) & DETECTOR_TYPE_MSK) >> DETECTOR_TYPE_OFST);
|
||||
if (type != GOTTHARD2){
|
||||
FILE_LOG(logERROR, ("This is not a Gotthard2 Server (read %d, expected %d)\n", type, GOTTHARD2));
|
||||
FILE_LOG(logERROR, ("This is not a Gotthard2 firmware (read %d, expected %d)\n", type, GOTTHARD2));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
|
Binary file not shown.
@ -127,7 +127,7 @@ int checkType() {
|
||||
#endif
|
||||
u_int32_t type = ((bus_r(BOARD_REVISION_REG) & DETECTOR_TYPE_MSK) >> DETECTOR_TYPE_OFST);
|
||||
if (type == DETECTOR_TYPE_MOENCH_VAL){
|
||||
FILE_LOG(logERROR, ("This is not a Gotthard Server (read %d, expected ?)\n", type));
|
||||
FILE_LOG(logERROR, ("This is not a Gotthard firmware (read %d, expected ?)\n", type));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
|
Binary file not shown.
@ -169,7 +169,7 @@ int checkType() {
|
||||
#endif
|
||||
u_int32_t type = ((bus_r(FPGA_VERSION_REG) & DETECTOR_TYPE_MSK) >> DETECTOR_TYPE_OFST);
|
||||
if (type != JUNGFRAU){
|
||||
FILE_LOG(logERROR, ("This is not a Jungfrau Server (read %d, expected %d)\n", type, JUNGFRAU));
|
||||
FILE_LOG(logERROR, ("This is not a Jungfrau firmware (read %d, expected %d)\n", type, JUNGFRAU));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -187,7 +187,7 @@ int checkType() {
|
||||
uint32_t expectedType = (((FPGA_VERSION_DTCTR_TYP_MOENCH_VAL) & FPGA_VERSION_DTCTR_TYP_MSK) >> FPGA_VERSION_DTCTR_TYP_OFST);
|
||||
|
||||
if (type != expectedType) {
|
||||
FILE_LOG(logERROR, ("(Type Fail) - This is not a Moench Detector Server (read %d, expected %d)\n",
|
||||
FILE_LOG(logERROR, ("(Type Fail) - This is not a Moench Detector firmware (read %d, expected %d)\n",
|
||||
type, expectedType));
|
||||
return FAIL;
|
||||
}
|
||||
|
Binary file not shown.
@ -72,7 +72,7 @@ void basictests() {
|
||||
return;
|
||||
}
|
||||
// does check only if flag is 0 (by default), set by command line
|
||||
if ((!debugflag) && ((testFpga() == FAIL)|| (testBus() == FAIL))) {
|
||||
if ((!debugflag) && ((checkType() == FAIL) || (testFpga() == FAIL)|| (testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Dangerous to continue.\n");
|
||||
FILE_LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
@ -160,7 +160,7 @@ int checkType() {
|
||||
#endif
|
||||
u_int32_t type = ((bus_r(FPGA_VERSION_REG) & DETECTOR_TYPE_MSK) >> DETECTOR_TYPE_OFST);
|
||||
if (type != MYTHEN3){
|
||||
FILE_LOG(logERROR, ("This is not a Mythen3 Server (read %d, expected %d)\n", type, MYTHEN3));
|
||||
FILE_LOG(logERROR, ("This is not a Mythen3 firmware (read %d, expected %d)\n", type, MYTHEN3));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
#define APILIB 0x200227
|
||||
#define APIRECEIVER 0x200227
|
||||
#define APIGUI 0x200227
|
||||
#define APIEIGER 0x200310
|
||||
#define APICTB 0x200310
|
||||
#define APIGOTTHARD 0x200310
|
||||
#define APIGOTTHARD2 0x200310
|
||||
#define APIJUNGFRAU 0x200310
|
||||
#define APIMYTHEN3 0x200310
|
||||
#define APIMOENCH 0x200310
|
||||
#define APIEIGER 0x200310
|
||||
|
Loading…
x
Reference in New Issue
Block a user