From 61aa266436c85d0d295161493b601c1d8c51ec65 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 27 Sep 2021 14:43:14 +0200 Subject: [PATCH] jungfrau: current source defaults at configuring chip --- .../jungfrauDetectorServer/slsDetectorFunctionList.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index 4bfc0d335..52fc32058 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -447,7 +447,8 @@ void setupDetector() { PLL_CNTRL_WR_PRMTR_MSK, PLL_CNTRL_PLL_RST_MSK, PLL_CNTRL_ADDR_MSK, PLL_CNTRL_ADDR_OFST, PLL_CNTRL_DBIT_WR_PRMTR_MSK, DBIT_CLK_INDEX); - bus_w(DAQ_REG, 0x0); /* Only once at server startup */ + /* Only once at server startup */ + bus_w(DAQ_REG, 0x0); LOG(logINFOBLUE, ("Setting Default parameters\n")); @@ -1752,8 +1753,10 @@ void configureChip() { if (getChipVersion() == 11) { LOG(logINFOBLUE, ("Configuring chip\n")); // write same register values back to configure chip - uint32_t val = bus_r(CONFIG_V11_REG); - bus_w(CONFIG_V11_REG, val); + bus_w(CONFIG_V11_REG, bus_r(CONFIG_V11_REG)); + // default values for current source + bus_w(CRRNT_SRC_COL_LSB_REG, BIT32_MASK); + bus_w(CRRNT_SRC_COL_MSB_REG, BIT32_MASK); chipConfigured = 1; } }