eiger server bug fix: read and write reg only wrote to the right fpga, fixed

This commit is contained in:
2018-12-03 10:55:32 +01:00
parent 2c08c1e7ce
commit 550ed4b1c2
4 changed files with 48 additions and 20 deletions

View File

@ -1,5 +1,5 @@
/** API versions */
#define APIRECEIVER 0x180823
#define APIEIGER 0x180820
#define APIEIGER 0x181130
#define APIJUNGFRAU 0x180823
#define APIGOTTHARD 0x181203

View File

@ -2014,14 +2014,24 @@ uint32_t Feb_Control_WriteRegister(uint32_t offset, uint32_t data) {
uint32_t value=0;
if(Module_TopAddressIsValid(&modules[1])){
if(!Feb_Interface_WriteRegister(Module_GetTopRightAddress (&modules[1]),offset, data,0, 0)) {
cprintf(RED,"Could not read value. Value read:%d\n", value);
cprintf(RED,"Could not read tr value. Value read:%d\n", value);
value = 0;
}
if(!Feb_Interface_WriteRegister(Module_GetTopLeftAddress (&modules[1]),offset, data,0, 0)) {
cprintf(RED,"Could not read tl value. Value read:%d\n", value);
value = 0;
}
} else {
if(!Feb_Interface_WriteRegister(Module_GetBottomRightAddress (&modules[1]),offset, data,0, 0)) {
cprintf(RED,"Could not read value. Value read:%d\n", value);
cprintf(RED,"Could not read br value. Value read:%d\n", value);
value = 0;
}
if(!Feb_Interface_WriteRegister(Module_GetBottomLeftAddress (&modules[1]),offset, data,0, 0)) {
cprintf(RED,"Could not read bl value. Value read:%d\n", value);
value = 0;
}
}
return Feb_Control_ReadRegister(offset);
}
@ -2029,16 +2039,34 @@ uint32_t Feb_Control_WriteRegister(uint32_t offset, uint32_t data) {
uint32_t Feb_Control_ReadRegister(uint32_t offset) {
uint32_t value=0;
uint32_t value1=0;
if(Module_TopAddressIsValid(&modules[1])){
if(!Feb_Interface_ReadRegister(Module_GetTopRightAddress (&modules[1]),offset, &value)) {
cprintf(RED,"Could not read value. Value read:%d\n", value);
value = 0;
}
if(!Feb_Interface_ReadRegister(Module_GetTopRightAddress (&modules[1]),offset, &value)) {
cprintf(RED,"Could not read value. Value read:%d\n", value);
value = 0;
}
printf("Read top right addr: 0x%08x\n", value);
if(!Feb_Interface_ReadRegister(Module_GetTopLeftAddress (&modules[1]),offset, &value1)) {
cprintf(RED,"Could not read value. Value read:%d\n", value1);
value1 = 0;
}
printf("Read top left addr: 0x%08x\n", value1);
if (value != value1)
value = -1;
} else {
if(!Feb_Interface_ReadRegister(Module_GetBottomRightAddress (&modules[1]),offset, &value)) {
cprintf(RED,"Could not read value. Value read:%d\n", value);
value = 0;
}
if(!Feb_Interface_ReadRegister(Module_GetBottomRightAddress (&modules[1]),offset, &value)) {
cprintf(RED,"Could not read value. Value read:%d\n", value);
value = 0;
}
printf("Read bottom right addr: 0x%08x\n", value);
if(!Feb_Interface_ReadRegister(Module_GetBottomLeftAddress (&modules[1]),offset, &value1)) {
cprintf(RED,"Could not read value. Value read:%d\n", value1);
value1 = 0;
}
printf("Read bottom left addr: 0x%08x\n", value1);
if (value != value1)
value = -1;
}
return value;
}

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
Repsitory UUID: 63c130a3806b47332b1532ab00f9f344c5839e0e
Revision: 348
Branch: 4.0.0-rc
Repsitory UUID: 2c08c1e7ce814934b4c943df2cc715c6bd406a83
Revision: 349
Branch: 4.0.1-rc
Last Changed Author: Dhanya_Thattil
Last Changed Rev: 3986
Last Changed Date: 2018-08-20 11:38:13.000000002 +0200 ./Makefile.virtual
Last Changed Rev: 4031
Last Changed Date: 2018-11-30 16:01:05.000000002 +0100 ./Makefile.virtual

View File

@ -1,6 +1,6 @@
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
#define GITREPUUID "63c130a3806b47332b1532ab00f9f344c5839e0e"
#define GITREPUUID "2c08c1e7ce814934b4c943df2cc715c6bd406a83"
#define GITAUTH "Dhanya_Thattil"
#define GITREV 0x3986
#define GITDATE 0x20180820
#define GITBRANCH "4.0.0-rc"
#define GITREV 0x4031
#define GITDATE 0x20181130
#define GITBRANCH "4.0.1-rc"