From 7c21aa96a9643507e35b62cfd0e0368ca8f64769 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 18 Sep 2020 17:58:39 +0200 Subject: [PATCH] g2: setting continuous mode frames in naother reg, and when changing from burst to continous --- slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h | 4 ++++ .../gotthard2DetectorServer/slsDetectorFunctionList.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h b/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h index 82471c63f..378aed102 100644 --- a/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h +++ b/slsDetectorServers/gotthard2DetectorServer/RegisterDefs.h @@ -152,6 +152,10 @@ #define ASIC_INT_EXPTIME_LSB_REG (0x04 * REG_OFFSET + BASE_ASIC) #define ASIC_INT_EXPTIME_MSB_REG (0x05 * REG_OFFSET + BASE_ASIC) +/* ASIC Exptime 64bit Register */ +#define ASIC_CONT_FRAMES_LSB_REG (0x06 * REG_OFFSET + BASE_ASIC) +#define ASIC_CONT_FRAMES_MSB_REG (0x07 * REG_OFFSET + BASE_ASIC) + /* Packetizer -------------------------------------------------------------*/ /* Packetizer Config Register */ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 6dbebe529..73eebee78 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -824,6 +824,9 @@ void setNumFrames(int64_t val) { LOG(logINFO, ("Setting number of frames %lld [Continuous mode]\n", val)); set64BitReg(val, SET_FRAMES_LSB_REG, SET_FRAMES_MSB_REG); + set64BitReg(val, ASIC_CONT_FRAMES_LSB_REG, + ASIC_CONT_FRAMES_MSB_REG); + } // burst else { @@ -2153,6 +2156,8 @@ int setBurstMode(enum burstMode burst) { // continuous if (burstMode == CONTINUOUS_INTERNAL || burstMode == CONTINUOUS_EXTERNAL) { set64BitReg(framesReg, SET_FRAMES_LSB_REG, SET_FRAMES_MSB_REG); + set64BitReg(framesReg, ASIC_CONT_FRAMES_LSB_REG, + ASIC_CONT_FRAMES_MSB_REG); set64BitReg(periodReg, SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG); LOG(logINFO, ("\tFrames reg: %lld, Period reg: %lldns\n", getNumFrames(), getPeriod()));