gotthard fix

This commit is contained in:
Dhanya Maliakal 2017-11-09 13:44:38 +01:00
parent 1420921291
commit d24ab31d87
7 changed files with 30 additions and 11 deletions

View File

@ -1623,7 +1623,7 @@ int getAdcConfigured(){
}
u_int32_t runBusy(void) {
u_int32_t s = bus_r(STATUS_REG);
u_int32_t s = bus_r(STATUS_REG) & RUN_BUSY_BIT;
return s;
}

View File

@ -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: e4fa807b5d987714a047b9d2cac271c89f6c2fef
Revision: 208
Branch: developer
Repsitory UUID: eb72e8f69f5c87f9330741e0d07fd48b9d937e09
Revision: 209
Branch: 3.0.1
Last Changed Author: Dhanya_Maliakal
Last Changed Rev: 1487
Last Changed Date: 2017-08-16 16:01:46.000000002 +0200 ./firmware_funcs.c
Last Changed Rev: 1584
Last Changed Date: 2017-11-08 15:45:16.000000002 +0100 ./server_funcs.c

View File

@ -1,11 +1,11 @@
//#define SVNPATH ""
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
//#define SVNREPPATH ""
#define SVNREPUUID "e4fa807b5d987714a047b9d2cac271c89f6c2fef"
//#define SVNREV 0x1487
#define SVNREPUUID "eb72e8f69f5c87f9330741e0d07fd48b9d937e09"
//#define SVNREV 0x1584
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "Dhanya_Maliakal"
#define SVNREV 0x1487
#define SVNDATE 0x20170816
#define SVNREV 0x1584
#define SVNDATE 0x20171108
//

View File

@ -185,6 +185,7 @@
#define ALL_FIFO_EMPTY_BIT 0x00010000 // data ready
#define RUNMACHINE_BUSY_BIT 0x00020000
#define READMACHINE_BUSY_BIT 0x00040000
#define STOPPED_BIT 0x00100000

View File

@ -1812,11 +1812,29 @@ int get_run_status(int file_des) {
retval= runState();
printf("\n\nSTATUS=%08x\n",retval);
//stopped (external stop, also maybe fifo full)
if (runState() & STOPPED_BIT){
printf("-----------------------------------STOPPED--------------------------------------x%0x\n",retval);
s=STOPPED;
retval= runState();
printf("reading again STATUS=%08x\n",retval);
if (runState() & STOPPED_BIT){
printf("-----------------------------------ERROR--------------------------------------x%0x\n",retval);
s=ERROR;
}
}
//error
if(retval&SOME_FIFO_FULL_BIT){
else if(retval&SOME_FIFO_FULL_BIT){
printf("-----------------------------------ERROR--------------------------------------x%0x\n",retval);
s=ERROR;
}
//runbusy=0
// else if(!(retval&RUNMACHINE_BUSY_BIT)){ //commented by Anna 24.10.2012
else if(!(retval&RUN_BUSY_BIT)){ // by Anna 24.10.2012