diff --git a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c index 2ea5b2400..b472f4843 100755 --- a/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/gotthardDetectorServer/firmware_funcs.c @@ -1430,7 +1430,7 @@ int configureMAC(int ipad,long long int macad,long long int detectormacad, int d tse_conf *tse_conf_regs; long int sum = 0; long int checksum; - int count,val; + int count; unsigned short *addr; mac_conf_regs=(mac_conf*)(CSP0BASE+offset*2); @@ -1440,35 +1440,40 @@ int configureMAC(int ipad,long long int macad,long long int detectormacad, int d printf("***Configuring MAC*** \n"); #endif + if(ival) - bus_w(addrr,(RESET_BIT|DIGITAL_TEST_BIT)); //0x080,reset mac (reset) + bus_w(addrr, bus_r(addrr) | (RESET_BIT|DIGITAL_TEST_BIT)); //0x080,reset mac (reset) else - bus_w(addrr,RESET_BIT); //0x080,reset mac (reset) - val=bus_r(addrr); + bus_w(addrr, bus_r(addrr) | RESET_BIT); //0x080,reset mac (reset) + #ifdef VERBOSE - printf("Value read from Multi-purpose Reg:%x\n",val); + printf("Value read from Multi-purpose Reg:%x\n",bus_r(addrr)); #endif // if(val!=0x080) return -1; usleep(500000); + + bus_w(addrr, bus_r(addrr) &(~ RESET_BIT));/* release reset */ if(ival) - bus_w(addrr,(ENET_RESETN_BIT|WRITE_BACK_BIT|DIGITAL_TEST_BIT)); //0x840,write shadow regs(enet reset,write bak) + bus_w(addrr, bus_r(addrr) | (ENET_RESETN_BIT|WRITE_BACK_BIT|DIGITAL_TEST_BIT)); //0x840,write shadow regs(enet reset,write bak) else - bus_w(addrr,(ENET_RESETN_BIT|WRITE_BACK_BIT)); //0x840,write shadow regs(enet reset,write bak) - val=bus_r(addrr); + bus_w(addrr, bus_r(addrr) | (ENET_RESETN_BIT|WRITE_BACK_BIT)); //0x840,write shadow regs(enet reset,write bak) + #ifdef VERBOSE - printf("Value read from Multi-purpose Reg:%x\n",val); + printf("Value read from Multi-purpose Reg:%x\n",bus_r(addrr)); #endif // if(val!=0x840) return -1; + bus_w(addrr, bus_r(addrr) &(~WRITE_BACK_BIT));/* release write_back */ + if(ival) - bus_w(addrr,(ENET_RESETN_BIT|DIGITAL_TEST_BIT)); //0x800,nreset phy(enet reset) + bus_w(addrr, bus_r(addrr) | (ENET_RESETN_BIT|DIGITAL_TEST_BIT)); //0x800,nreset phy(enet reset) else - bus_w(addrr,ENET_RESETN_BIT); //0x800,nreset phy(enet reset) - val=bus_r(addrr); + bus_w(addrr, bus_r(addrr) | ENET_RESETN_BIT); //0x800,nreset phy(enet reset) + #ifdef VERBOSE - printf("Value read from Multi-purpose Reg:%x\n",val); + printf("Value read from Multi-purpose Reg:%x\n",bus_r(addrr)); #endif // if(val!=0x800) return -1; @@ -1573,26 +1578,26 @@ int configureMAC(int ipad,long long int macad,long long int detectormacad, int d if(ival) - bus_w(addrr,(INT_RSTN_BIT|ENET_RESETN_BIT|WRITE_BACK_BIT|DIGITAL_TEST_BIT)); //0x2840,write shadow regs.. + bus_w(addrr, bus_r(addrr) | (INT_RSTN_BIT|ENET_RESETN_BIT|WRITE_BACK_BIT|DIGITAL_TEST_BIT)); //0x2840,write shadow regs.. else - bus_w(addrr,(INT_RSTN_BIT|ENET_RESETN_BIT|WRITE_BACK_BIT)); //0x2840,write shadow regs.. + bus_w(addrr, bus_r(addrr) | (INT_RSTN_BIT|ENET_RESETN_BIT|WRITE_BACK_BIT)); //0x2840,write shadow regs.. - val=bus_r(addrr); #ifdef VERBOSE - printf("Value read from Multi-purpose Reg:%x\n",val); + printf("Value read from Multi-purpose Reg:%x\n",bus_r(addrr)); #endif // if(val!=0x2840) return -1; usleep(100000); - if(ival) - bus_w(addrr,(INT_RSTN_BIT|ENET_RESETN_BIT|SW1_BIT|DIGITAL_TEST_BIT)); //0x2820,write shadow regs.. - else - bus_w(addrr,(INT_RSTN_BIT|ENET_RESETN_BIT|SW1_BIT)); //0x2820,write shadow regs.. + bus_w(addrr, bus_r(addrr) &(~WRITE_BACK_BIT)); + + if(ival) + bus_w(addrr, bus_r(addrr) | (INT_RSTN_BIT|ENET_RESETN_BIT|SW1_BIT|DIGITAL_TEST_BIT)); //0x2820,write shadow regs.. + else + bus_w(addrr, bus_r(addrr) | (INT_RSTN_BIT|ENET_RESETN_BIT|SW1_BIT)); //0x2820,write shadow regs.. - val=bus_r(addrr); #ifdef VERBOSE - printf("Value read from Multi-purpose Reg:%x\n",val); + printf("Value read from Multi-purpose Reg:%x\n",bus_r(addrr)); #endif // if(val!=0x2820) return -1; diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt index 997f5d033..0b0fd3c25 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: dc7806552a0a896870c4dd94dd47931c39180de7 -Revision: 205 -Branch: gotthard25um +Repsitory UUID: a0ae3985068425e7142df8271eac6ce09a238dc9 +Revision: 206 +Branch: developer Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1453 -Last Changed Date: 2017-08-03 10:03:31.000000002 +0200 ./firmware_funcs.c +Last Changed Rev: 1454 +Last Changed Date: 2017-08-04 09:28:44.000000002 +0200 ./firmware_funcs.c diff --git a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h index 30b193e5e..b1430c924 100644 --- a/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h +++ b/slsDetectorSoftware/gotthardDetectorServer/gitInfoGotthard.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUID "dc7806552a0a896870c4dd94dd47931c39180de7" -//#define SVNREV 0x1453 +#define SVNREPUUID "a0ae3985068425e7142df8271eac6ce09a238dc9" +//#define SVNREV 0x1454 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "Dhanya_Maliakal" -#define SVNREV 0x1453 -#define SVNDATE 0x20170803 +#define SVNREV 0x1454 +#define SVNDATE 0x20170804 // diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.0.2 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.0.2 deleted file mode 100755 index dfd43e0e0..000000000 Binary files a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.0.2 and /dev/null differ diff --git a/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.0.3 b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.0.3 new file mode 100755 index 000000000..8872f4574 Binary files /dev/null and b/slsDetectorSoftware/gotthardDetectorServer/gotthardDetectorServerv3.0.0.3 differ