by default readout through blackfin upon server startup

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@422 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2013-01-11 09:17:41 +00:00
parent da2fd8369d
commit 42fe126f33
2 changed files with 12 additions and 6 deletions

View File

@ -1665,11 +1665,15 @@ u_int32_t* fifo_read_event()
if (runBusy()==0) { if (runBusy()==0) {
t = bus_r(LOOK_AT_ME_REG); t = bus_r(LOOK_AT_ME_REG);
if ((t&0x1)==0) { if ((t&0x1)==0) {
#ifdef VERBOSE
printf("no frame found - exiting "); printf("no frame found - exiting ");
printf("%08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG)); printf("%08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG));
#endif
return NULL; return NULL;
} else { } else {
#ifdef VERBOSE
printf("no frame found %x status %x\n", bus_r(LOOK_AT_ME_REG),runState()); printf("no frame found %x status %x\n", bus_r(LOOK_AT_ME_REG),runState());
#endif
break; break;
} }
} }
@ -1677,9 +1681,9 @@ u_int32_t* fifo_read_event()
} }
//#ifdef VERBOSE #ifdef VERBOSE
printf("before readout %08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG)); printf("before readout %08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG));
//#endif #endif
dma_memcpy(now_ptr,values ,dataBytes); dma_memcpy(now_ptr,values ,dataBytes);
@ -1693,10 +1697,10 @@ u_int32_t* fifo_read_event()
printf("********\n"); printf("********\n");
//memcpy(now_ptr, values, dataBytes); //memcpy(now_ptr, values, dataBytes);
#endif #endif
//#ifdef VERBOSE #ifdef VERBOSE
printf("Copying to ptr %08x %d\n",(unsigned int)(now_ptr), dataBytes); printf("Copying to ptr %08x %d\n",(unsigned int)(now_ptr), dataBytes);
printf("after readout %08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG)); printf("after readout %08x %08x\n", runState(), bus_r(LOOK_AT_ME_REG));
//#endif #endif
if (storeInRAM>0) { if (storeInRAM>0) {
now_ptr+=dataBytes; now_ptr+=dataBytes;

View File

@ -69,7 +69,8 @@ int init_detector( int b) {
if (b) { if (b) {
#ifdef MCB_FUNCS #ifdef MCB_FUNCS
initDetector(); initDetector();
printf("\n----initdetector done! new serverRdRR\n\n"); printf("\n***initdetector done*** \n\n");
#endif
testFpga(); testFpga();
testRAM(); testRAM();
//gotthard specific //gotthard specific
@ -85,10 +86,11 @@ int init_detector( int b) {
setPeriod(1e9); setPeriod(1e9);
setDelay(0); setDelay(0);
setGates(0); setGates(0);
#endif
setTiming(GET_EXTERNAL_COMMUNICATION_MODE); setTiming(GET_EXTERNAL_COMMUNICATION_MODE);
setMaster(GET_MASTER); setMaster(GET_MASTER);
setSynchronization(GET_SYNCHRONIZATION_MODE); setSynchronization(GET_SYNCHRONIZATION_MODE);
startReceiver(0);
} }
strcpy(mess,"dummy message"); strcpy(mess,"dummy message");
strcpy(lastClientIP,"none"); strcpy(lastClientIP,"none");