Skip to content

Commit 7bed3b9

Browse files
committed
FEBII developments
1 parent bd0535f commit 7bed3b9

File tree

4 files changed

+425
-33
lines changed

4 files changed

+425
-33
lines changed

otsdaq-mu2e-crv/FEInterfaces/FEBII_Registers.h

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,24 @@ enum Register : uint16_t
2727
CntHI = 0x1022,
2828
CntLO = 0x1023,
2929
ThresholdGlobal = 0x1026,
30+
Port = 0x1029,
3031
UptimeHI = 0x106C,
3132
UptimeLo = 0x106D,
3233
EWT = 0x106E,
3334
EWTCount = 0x106F,
3435
ThresholdBase = 0x1070, // to 0x107F
3536
ChannelMapBase = 0x1080, // to 0x108F
3637
// implemented in uC
37-
TrimBase = 0x1090, // to 0x1090
38+
BaselineBase = 0x1090,
39+
TrimBase = 0x10b0, // to 0x1090
3840
LEDBias = 0x10a0, // to 0x10a3
3941
BiasBase = 0x10a4, // to 0x10a5
4042
VGABase = 0x10a6, // to 0x10a7
4143

44+
// AFE reads
45+
AFE0_base = 0x1100,
46+
AFE1_base = 0x1200,
47+
4248
// registers that effect all FPGAs
4349
FlashGateEn = 0x1300,
4450
FlashGateOn = 0x1301, // 6.25ns, default 1
@@ -67,8 +73,22 @@ enum Register : uint16_t
6773
CMBENA = 0x9106
6874
}; // end ROC_Register enum
6975

76+
enum AFERegister : uint16_t
77+
{
78+
// AFE registers, write only (read is a multi step process)
79+
Offset_en = 0x3, // bit 8
80+
Offset_ch1 = 0x0D,
81+
Offset_ch2 = 0x0F,
82+
Offset_ch3 = 0x11,
83+
Offset_ch4 = 0x13,
84+
Offset_ch5 = 0x1F,
85+
Offset_ch6 = 0x1D,
86+
Offset_ch7 = 0x1B,
87+
Offset_ch8 = 0x19,
88+
};
89+
7090
uint16_t FPGA[] = {0x000, 0x400, 0x800, 0xC00};
7191

72-
} // namespace FEB
92+
} // namespace FEBII
7393

7494
#endif // FEBII_REGISTERS_H

otsdaq-mu2e-crv/FEInterfaces/ROCCosmicRayVetoInterface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ class ROCCosmicRayVetoInterface : public ROCCoreVInterface
5858
void FebConfigure(bool useOtsConfig = true);
5959
void ResetRxBuffers();
6060
void SetMarkerSync(bool enable=true);
61+
int16_t Realign(int sleep_uc = 1000);
62+
void ResetPLL(int sleep_us = 1000);
6163

64+
uint16_t ReadAFE(uint16_t fpga, uint16_t afe_no, uint16_t reg);
6265
// CRV FEB specific functions
6366
//void FebTakePedestral();
6467

@@ -91,13 +94,18 @@ class ROCCosmicRayVetoInterface : public ROCCoreVInterface
9194
void GetHistograms (__ARGS__);
9295
void RegDump (__ARGS__);
9396
void FebIIConfigure (__ARGS__);
97+
void FebIIAlign (__ARGS__);
9498
void FebIISetThreshold (__ARGS__);
9599
void FebIISetBias (__ARGS__);
96100
void FebIISetBiasTrim (__ARGS__);
97101
void FebIISetGateOnSpill (__ARGS__);
98102
void FebIISetGateOffSpill (__ARGS__);
99103
void FebIIGetStatus (__ARGS__);
100104
void FebIISetChannel (__ARGS__);
105+
void FebIISetAFEOffset (__ARGS__);
106+
void FebIIGetBaselines (__ARGS__);
107+
void FebIITrigBaselines (__ARGS__);
108+
void SetInputMask (__ARGS__);
101109
// clang-format on
102110
};
103111

0 commit comments

Comments
 (0)