diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer index 782979196..d89e21958 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 5906b1672..3447d6900 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -1799,10 +1799,19 @@ int setBurstModeinFPGA(enum burstMode value) { int setBurstMode(enum burstMode burst) { FILE_LOG(logINFO, ("Setting burst mode to %s\n", burst == BURST_OFF ? "off" : (burst == BURST_INTERNAL ? "internal" : "external"))); + // remember the number of frames and period (before changing burst mode) + int64_t frames = getNumFrames(); + int64_t period = getPeriod(); + if (setBurstModeinFPGA(burst) == FAIL) { return FAIL; } + // set number of frames and period again (set registers according to timing mode) + FILE_LOG(logINFO, ("\tUpdating #frames and period registers")); + setNumFrames(frames); + setPeriod(period); + FILE_LOG(logINFO, ("\tSetting %s Mode in Chip\n", burstMode == BURST_OFF ? "Continuous" : "Burst")); int value = burstMode ? ASIC_GLOBAL_BURST_VALUE : ASIC_GLOBAL_CONT_VALUE;