diff --git a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer index 317f9e101..0a67d1f5e 100755 Binary files a/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer and b/slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer differ diff --git a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c index a2e882344..e3ea051c8 100755 --- a/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/ctbDetectorServer/slsDetectorFunctionList.c @@ -1633,29 +1633,25 @@ int setFrequency(enum CLKINDEX ind, int val) { return FAIL; } - // Remembering adcphase/ dbit phase - int adcPhase = getPhase(ADC_CLK, 0); - FILE_LOG(logDEBUG1, ("\tRemembering ADC phase: %d\n", adcPhase)); - int dbitPhase = getPhase(DBIT_CLK, 0); - FILE_LOG(logDEBUG1, ("\tRemembering DBIT phase: %d\n", dbitPhase)); + // Remembering adcphase/ dbit phase in degrees + int adcPhase = getPhase(ADC_CLK, 1); + FILE_LOG(logDEBUG1, ("\tRemembering ADC phase: %d degrees\n", adcPhase)); + int dbitPhase = getPhase(DBIT_CLK, 1); + FILE_LOG(logDEBUG1, ("\tRemembering DBIT phase: %d degrees\n", dbitPhase)); // Calculate and set output frequency clkFrequency[ind] = ALTERA_PLL_SetOuputFrequency (ind, PLL_VCO_FREQ_MHZ, val); FILE_LOG(logINFO, ("\t%s clock (%d) frequency set to %d MHz\n", clock_names[ind], ind, clkFrequency[ind])); - // adc and dbit phase is reset by pll (when setting output frequency) + // phase reset by pll (when setting output frequency) clkPhase[ADC_CLK] = 0; clkPhase[DBIT_CLK] = 0; - // set the phase if custom set - if (clkPhase[ADC_CLK] != adcPhase) { - FILE_LOG(logINFO, ("\tPhase reset by PLL\n\tCorrecting ADC phase to %d\n", adcPhase)); - setPhase(ADC_CLK, adcPhase, 0); - } - if (clkPhase[DBIT_CLK] != dbitPhase) { - FILE_LOG(logINFO, ("\tPhase reset by PLL\n\tCorrecting DBIT phase to %d\n", dbitPhase)); - setPhase(DBIT_CLK, dbitPhase, 0); - } + // set the phase (reset by pll) + FILE_LOG(logINFO, ("\tCorrecting ADC phase to %d degrees\n", adcPhase)); + setPhase(ADC_CLK, adcPhase, 1); + FILE_LOG(logINFO, ("\tCorrecting DBIT phase to %d degrees\n", dbitPhase)); + setPhase(DBIT_CLK, dbitPhase, 1); // required to reconfigure as adc clock is stopped temporarily when resetting pll (in changing output frequency) AD9257_Configure(); diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index 21ed20535..addad7e8b 100755 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 03ab37d4f..821c8a0c4 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -1154,11 +1154,11 @@ int setClockDivider(enum CLKINDEX ind, int val) { clkPhase[SYSTEM_C3] = 0; } - // set the phase in degreesif custom set + // set the phase in degrees (reset by pll) { int i = 0; for (i = 0; i < NUM_CLOCKS; ++i) { - FILE_LOG(logINFO, ("\tPhase reset by PLL\n\tCorrecting %s clock (%d) phase to %d degrees\n", clock_names[i], i, oldPhases[i])); + FILE_LOG(logINFO, ("\tCorrecting %s clock (%d) phase to %d degrees\n", clock_names[i], i, oldPhases[i])); setPhase(i, oldPhases[i], 1); } } diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index e53e9d3ce..6266e2491 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index c6ed98fe3..a404a9780 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -1179,11 +1179,11 @@ int setClockDivider(enum CLKINDEX ind, int val) { clkPhase[SYSTEM_C2] = 0; } - // set the phase in degreesif custom set + // set the phase in degrees (reset by pll) { int i = 0; for (i = 0; i < NUM_CLOCKS; ++i) { - FILE_LOG(logINFO, ("\tPhase reset by PLL\n\tCorrecting %s clock (%d) phase to %d degrees\n", clock_names[i], i, oldPhases[i])); + FILE_LOG(logINFO, ("\tCorrecting %s clock (%d) phase to %d degrees\n", clock_names[i], i, oldPhases[i])); setPhase(i, oldPhases[i], 1); } } diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index dff1559f6..d2f718692 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -4,9 +4,9 @@ #define APIRECEIVER 0x190722 #define APIGUI 0x190723 #define APIMOENCH 0x190820 -#define APICTB 0x191111 #define APIGOTTHARD 0x191111 #define APIJUNGFRAU 0x191111 #define APIEIGER 0x191111 #define APIMYTHEN3 0x191121 #define APIGOTTHARD2 0x191121 +#define APICTB 0x191121