diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index e1caea965..54c062ca5 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -191,11 +191,15 @@ int Feb_Control_Init(int master, int top){ int serial=1; switch(Feb_Control_module_number){ case 34: serial = 0; break; //martin half - case 31: serial = 0; break; //martin case 26: serial = 0; break; //leo + + case 31: serial = 0; break; //martin case 32: serial = 1; break; case 24: serial = 2; break; case 25: serial = 3; break; + + case 49: serial = 0; break; // Gemma + case 48: serial = 1; break; // Gemma } printf("serial: %d\n",serial); diff --git a/slsDetectorSoftware/eigerDetectorServer/FebInterface.c b/slsDetectorSoftware/eigerDetectorServer/FebInterface.c index 9e7261d1a..e913e1e02 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebInterface.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebInterface.c @@ -71,6 +71,10 @@ void Feb_Interface_SendCompleteList(unsigned int n,unsigned int* list){ int Feb_Interface_WriteTo(unsigned int ch){ if(ch>0xfff) return 0; +#ifdef MARTIN + printf("FIW ch %d\n", ch); +#endif + Feb_Interface_send_data_raw[0] = 0x8fff0000; if(Local_Write(ll,4,Feb_Interface_send_data_raw)!=4) return 0; diff --git a/slsDetectorSoftware/eigerDetectorServer/LocalLinkInterface.c b/slsDetectorSoftware/eigerDetectorServer/LocalLinkInterface.c index dfd0b27ba..ac59d43a9 100644 --- a/slsDetectorSoftware/eigerDetectorServer/LocalLinkInterface.c +++ b/slsDetectorSoftware/eigerDetectorServer/LocalLinkInterface.c @@ -126,6 +126,13 @@ int Local_Write(struct LocalLinkInterface* ll,unsigned int buffer_len, void *buf last_word = (buffer_len-1)/4; word_ptr = (unsigned int *)buffer; +#ifdef MARTIN + printf("LL Write - Len: %2d - If: %X - Data: ",buffer_len, ll->ll_fifo_base); + for (i=0; i < buffer_len/4; i++) + printf("%.8X ",*(((unsigned *) buffer)+i)); + printf("\n"); +#endif + while (words_send <= last_word) { while (!vacancy)//wait for Fifo to be empty again @@ -165,6 +172,10 @@ int Local_Read(struct LocalLinkInterface* ll,unsigned int buffer_len, void *buff volatile unsigned int fifo_val; int sof = 0; +#ifdef MARTIN + printf("LL Read - If: %X - Data: ",ll->ll_fifo_base); +#endif + word_ptr = (unsigned int *)buffer; do { @@ -190,6 +201,9 @@ int Local_Read(struct LocalLinkInterface* ll,unsigned int buffer_len, void *buff { if ( (buffer_len >> 2) > buffer_ptr) { +#ifdef MARTIN + printf("%.8X ", fifo_val); +#endif word_ptr[buffer_ptr++] = fifo_val; //write to buffer } else @@ -201,6 +215,9 @@ int Local_Read(struct LocalLinkInterface* ll,unsigned int buffer_len, void *buff if (status & PLB_LL_FIFO_STATUS_LL_EOF) { len = (buffer_ptr << 2) -3 + ( (status & PLB_LL_FIFO_STATUS_LL_REM)>>PLB_LL_FIFO_STATUS_LL_REM_SHIFT ); +#ifdef MARTIN + printf("Len: %d\n",len); +#endif // printf(">>>>status=0x%08x EOF len = %d \n\r\n\r",status, len); buffer_ptr = 0; return len; diff --git a/slsDetectorSoftware/eigerDetectorServer/Makefile b/slsDetectorSoftware/eigerDetectorServer/Makefile index 046fd22eb..bd3adec6e 100755 --- a/slsDetectorSoftware/eigerDetectorServer/Makefile +++ b/slsDetectorSoftware/eigerDetectorServer/Makefile @@ -1,6 +1,6 @@ CC = powerpc-4xx-softfloat-gcc CCX = powerpc-4xx-softfloat-g++ -CFLAGS += -Wall -DDACS_INT -DEIGERD -DSLS_DETECTOR_FUNCTION_LIST -DDACS_INT -DSTOP_SERVER #-DVERBOSE #-DVIRTUAL -DPCCOMPILE +CFLAGS += -Wall -DDACS_INT -DEIGERD -DSLS_DETECTOR_FUNCTION_LIST -DDACS_INT -DSTOP_SERVER #-DVERBOSE #-DVIRTUAL -DPCCOMPILE -DMARTIN LDLIBS += -lm -lstdc++ PROGS = eigerDetectorServer diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer index dbf8b8a64..4630540ed 100755 Binary files a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer and b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServer differ