diff --git a/slsDetectorSoftware/jungfrauDetectorServer/firmware_funcs.c b/slsDetectorSoftware/jungfrauDetectorServer/firmware_funcs.c index 8907cc20f..3b2394e7f 100755 --- a/slsDetectorSoftware/jungfrauDetectorServer/firmware_funcs.c +++ b/slsDetectorSoftware/jungfrauDetectorServer/firmware_funcs.c @@ -90,7 +90,7 @@ u_int32_t progressMask=0; int phase_shift=0;//DEFAULT_PHASE_SHIFT; int ipPacketSize=DEFAULT_IP_PACKETSIZE; int udpPacketSize=DEFAULT_UDP_PACKETSIZE; -int clockdivider; +int clockdivider = 20; /* #ifndef NEW_PLL_RECONFIG u_int32_t clkDivider[2]={32,16}; @@ -539,7 +539,6 @@ u_int32_t adcPipeline(int d) { if (d>=0){ printf("Setting ADC Pipeline to 0x%x\n",d); bus_w(ADC_PIPELINE_REG, d); - clockdivider = d; } return bus_r(ADC_PIPELINE_REG); @@ -1504,12 +1503,12 @@ int configureInterface(uint32_t destip,uint64_t destmac,uint64_t sourcemac,int #endif bus_w(CONTROL_REG,GB10_RESET_BIT); - sleep(1); + usleep(500 * 1000); bus_w(CONTROL_REG,0); - usleep(10000); + usleep(10* 1000); bus_w(CONFIG_REG,conf | GB10_NOT_CPU_BIT); printf("System status register is %08x\n",bus_r(SYSTEM_STATUS_REG)); - + usleep(500 * 1000); return 0; //any value doesnt matter - dhanya } @@ -1550,7 +1549,7 @@ int configureMAC(uint32_t destip,uint64_t destmac,uint64_t sourcemac,int source bus_w(CONTROL_REG,GB10_RESET_BIT); bus_w(CONTROL_REG,0); - usleep(10000); + usleep(10 * 1000); bus_w(CONFIG_REG,conf | GB10_NOT_CPU_BIT); printf("System status register is %08x\n",bus_r(SYSTEM_STATUS_REG)); return OK; diff --git a/slsDetectorSoftware/jungfrauDetectorServer/jungfrauDetectorServerv2.2.1 b/slsDetectorSoftware/jungfrauDetectorServer/jungfrauDetectorServerv2.2.1 index 27d113745..b79b7afa7 100755 Binary files a/slsDetectorSoftware/jungfrauDetectorServer/jungfrauDetectorServerv2.2.1 and b/slsDetectorSoftware/jungfrauDetectorServer/jungfrauDetectorServerv2.2.1 differ diff --git a/slsDetectorSoftware/jungfrauDetectorServer/mcb_funcs.c b/slsDetectorSoftware/jungfrauDetectorServer/mcb_funcs.c index 84d84c653..2c22e1143 100755 --- a/slsDetectorSoftware/jungfrauDetectorServer/mcb_funcs.c +++ b/slsDetectorSoftware/jungfrauDetectorServer/mcb_funcs.c @@ -133,6 +133,8 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) { /* #endif */ destMod->serialnumber=srcMod->serialnumber; } + + /* if ((srcMod->nchip)>(destMod->nchip)) { printf("Number of chip of source is larger than number of chips of destination\n"); return FAIL; @@ -141,6 +143,8 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) { printf("Number of channels of source is larger than number of channels of destination\n"); return FAIL; } + */ + if ((srcMod->ndac)>(destMod->ndac)) { printf("Number of dacs of source is larger than number of dacs of destination\n"); return FAIL; @@ -153,8 +157,8 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) { #ifdef VERBOSE printf("DACs: src %d, dest %d\n",srcMod->ndac,destMod->ndac); printf("ADCs: src %d, dest %d\n",srcMod->nadc,destMod->nadc); - printf("Chips: src %d, dest %d\n",srcMod->nchip,destMod->nchip); - printf("Chans: src %d, dest %d\n",srcMod->nchan,destMod->nchan); + //printf("Chips: src %d, dest %d\n",srcMod->nchip,destMod->nchip); + //printf("Chans: src %d, dest %d\n",srcMod->nchan,destMod->nchan); #endif @@ -162,8 +166,8 @@ int copyModule(sls_detector_module *destMod, sls_detector_module *srcMod) { destMod->ndac=srcMod->ndac; destMod->nadc=srcMod->nadc; - destMod->nchip=srcMod->nchip; - destMod->nchan=srcMod->nchan; + // destMod->nchip=srcMod->nchip; + //destMod->nchan=srcMod->nchan; if (srcMod->reg>=0) destMod->reg=srcMod->reg; #ifdef VERBOSE @@ -1081,7 +1085,7 @@ int initMCBregisters(int cm, int imod){ } int initModulebyNumber(sls_detector_module myMod) { - + printf("\nInitializing Module\n"); int nchip,nchan;//int ichip, nchip, ichan, nchan; int im, modmi,modma; // int ft, cae, ae, coe, ocoe, counts, chanreg; @@ -1110,6 +1114,7 @@ int initModulebyNumber(sls_detector_module myMod) { } //printf("ndac:%d\n",NDAC); + for (idac=0; idac=getNModBoard()) { @@ -2467,7 +2470,6 @@ int send_update(int file_des) { retval=setExposureTime(tns); n = sendDataOnly(file_des,&retval,sizeof(int64_t)); retval=setPeriod(tns); - cprintf(RED,"updated frame period from %lld tns:%d\n", (long long int)retval, tns); n = sendDataOnly(file_des,&retval,sizeof(int64_t)); retval=setDelay(tns); n = sendDataOnly(file_des,&retval,sizeof(int64_t));