jungfrau server: setting defaults for current source col registers when disabling current source, and 0.5 ms usleep between power chip and config chip to test

This commit is contained in:
maliakal_d 2021-10-06 13:41:50 +02:00
parent 2fc2c34fad
commit 5c3a408a89

View File

@ -1752,6 +1752,8 @@ void configureChip() {
// only for chipv1.1 // only for chipv1.1
if (getChipVersion() == 11) { if (getChipVersion() == 11) {
LOG(logINFOBLUE, ("Configuring chip\n")); LOG(logINFOBLUE, ("Configuring chip\n"));
// waiting 500 ms before configuring chip
usleep(500 * 1000);
// write same register values back to configure chip // write same register values back to configure chip
bus_w(CONFIG_V11_REG, bus_r(CONFIG_V11_REG)); bus_w(CONFIG_V11_REG, bus_r(CONFIG_V11_REG));
// default values for current source // default values for current source
@ -2204,6 +2206,10 @@ void setFilterCell(int iCell) {
void disableCurrentSource() { void disableCurrentSource() {
LOG(logINFO, ("Disabling Current Source\n")); LOG(logINFO, ("Disabling Current Source\n"));
bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_CRRNT_SRC_ENBL_MSK); bus_w(DAQ_REG, bus_r(DAQ_REG) & ~DAQ_CRRNT_SRC_ENBL_MSK);
// default values for current source
bus_w(CRRNT_SRC_COL_LSB_REG, BIT32_MASK);
bus_w(CRRNT_SRC_COL_MSB_REG, BIT32_MASK);
} }
void enableCurrentSource(int fix, uint64_t select, int normal) { void enableCurrentSource(int fix, uint64_t select, int normal) {