mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 00:50:42 +02:00
G2clkdiv (#547)
* g2 changing clkdivs 2 3 4 to defaults for burst and cw mode
This commit is contained in:
parent
76c18f3303
commit
1425382dbb
@ -98,7 +98,7 @@ This document describes the differences between v7.0.0 and v6.x.x
|
||||
- ctb and moench Fw fixed (to work with pattern commdand) )addreess length
|
||||
- setting rx_hostname (or udp_dstip with rx_hostname not none) will always set udp_dstmac. solves problem of chaing udp_dstip and udp_dstmac stays the same
|
||||
- jungfrau reset core and usleep removed (fix for 6.1.1 is now fixed in firmware)
|
||||
|
||||
- g2 change clkdivs 2 3 4 to defaults for burst and cw mode.
|
||||
|
||||
2. Resolved Issues
|
||||
==================
|
||||
|
@ -2563,6 +2563,7 @@ class Detector(CppDetectorApi):
|
||||
Note
|
||||
----
|
||||
BURST_INTERNAL (default), BURST_EXTERNAL, CONTINUOUS_INTERNAL, CONTINUOUS_EXTERNAL
|
||||
Also changes clkdiv 2, 3, 4
|
||||
"""
|
||||
return self.getBurstMode()
|
||||
|
||||
|
Binary file not shown.
@ -1750,6 +1750,52 @@ void updatingRegisters() {
|
||||
LOG(logINFO, ("\tDone Updating registers\n\n"));
|
||||
}
|
||||
|
||||
int updateClockDivs() {
|
||||
char *clock_names[] = {CLK_NAMES};
|
||||
switch (burstMode) {
|
||||
case BURST_INTERNAL:
|
||||
case BURST_EXTERNAL:
|
||||
if (setClockDivider(SYSTEM_C0, DEFAULT_BURST_SYSTEM_C0) == FAIL) {
|
||||
LOG(logERROR, ("Could not set clk %s speed to %d.\n",
|
||||
clock_names[SYSTEM_C0], DEFAULT_BURST_SYSTEM_C0));
|
||||
return FAIL;
|
||||
}
|
||||
if (setClockDivider(SYSTEM_C1, DEFAULT_BURST_SYSTEM_C1) == FAIL) {
|
||||
LOG(logERROR, ("Could not set clk %s speed to %d.\n",
|
||||
clock_names[SYSTEM_C0], DEFAULT_BURST_SYSTEM_C1));
|
||||
return FAIL;
|
||||
}
|
||||
if (setClockDivider(SYSTEM_C2, DEFAULT_BURST_SYSTEM_C2) == FAIL) {
|
||||
LOG(logERROR, ("Could not set clk %s speed to %d.\n",
|
||||
clock_names[SYSTEM_C0], DEFAULT_BURST_SYSTEM_C2));
|
||||
return FAIL;
|
||||
}
|
||||
break;
|
||||
case CONTINUOUS_INTERNAL:
|
||||
case CONTINUOUS_EXTERNAL:
|
||||
if (setClockDivider(SYSTEM_C0, DEFAULT_CNTNS_SYSTEM_C0) == FAIL) {
|
||||
LOG(logERROR, ("Could not set clk %s speed to %d.\n",
|
||||
clock_names[SYSTEM_C0], DEFAULT_CNTNS_SYSTEM_C0));
|
||||
return FAIL;
|
||||
}
|
||||
if (setClockDivider(SYSTEM_C1, DEFAULT_CNTNS_SYSTEM_C1) == FAIL) {
|
||||
LOG(logERROR, ("Could not set clk %s speed to %d.\n",
|
||||
clock_names[SYSTEM_C0], DEFAULT_CNTNS_SYSTEM_C1));
|
||||
return FAIL;
|
||||
}
|
||||
if (setClockDivider(SYSTEM_C2, DEFAULT_CNTNS_SYSTEM_C2) == FAIL) {
|
||||
LOG(logERROR, ("Could not set clk %s speed to %d.\n",
|
||||
clock_names[SYSTEM_C0], DEFAULT_CNTNS_SYSTEM_C2));
|
||||
return FAIL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG(logERROR, ("Unknown burst mode. Cannot update clock divs.\n"));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
void setTiming(enum timingMode arg) {
|
||||
switch (arg) {
|
||||
case AUTO_TIMING:
|
||||
@ -2780,6 +2826,9 @@ int setBurstMode(enum burstMode burst) {
|
||||
}
|
||||
|
||||
updatingRegisters();
|
||||
|
||||
updateClockDivs();
|
||||
|
||||
return configureASICGlobalSettings();
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,14 @@
|
||||
#define DEFAULT_SYSTEM_C2 (5) //(144444448) // sync_clk, 144 MHz
|
||||
#define DEFAULT_SYSTEM_C3 (5) //(144444448) // str_clk, 144 MHz
|
||||
|
||||
#define DEFAULT_CNTNS_SYSTEM_C0 (10) // (72222224) run_clk, 72 MHz
|
||||
#define DEFAULT_CNTNS_SYSTEM_C1 (20) // (36111112) chip_clk, 36 MHz
|
||||
#define DEFAULT_CNTNS_SYSTEM_C2 (10) // (72222224) sync_clk, 72 MHz
|
||||
|
||||
#define DEFAULT_BURST_SYSTEM_C0 (5) // (144444448) run_clk, 144 MHz
|
||||
#define DEFAULT_BURST_SYSTEM_C1 (10) // (72222224) chip_clk, 72 MHz
|
||||
#define DEFAULT_BURST_SYSTEM_C2 (5) // (144444448) sync_clk, 144 MHz
|
||||
|
||||
#define DEFAULT_READOUT_SPEED (G2_108MHZ)
|
||||
#define SPEED_144_CLKDIV_0 (6)
|
||||
#define SPEED_144_CLKDIV_1 (6)
|
||||
|
@ -404,6 +404,7 @@ void setSynchronization(int enable);
|
||||
|
||||
#ifdef GOTTHARD2D
|
||||
void updatingRegisters();
|
||||
int updateClockDivs();
|
||||
#endif
|
||||
void setTiming(enum timingMode arg);
|
||||
enum timingMode getTiming();
|
||||
|
@ -1395,7 +1395,7 @@ class Detector {
|
||||
Result<defs::burstMode> getBurstMode(Positions pos = {});
|
||||
|
||||
/** [Gotthard2] BURST_INTERNAL (default), BURST_EXTERNAL,
|
||||
* CONTINUOUS_INTERNAL, CONTINUOUS_EXTERNAL */
|
||||
* CONTINUOUS_INTERNAL, CONTINUOUS_EXTERNAL. Also changes clkdiv 2, 3, 4 */
|
||||
void setBurstMode(defs::burstMode value, Positions pos = {});
|
||||
|
||||
/** [Gotthard2] */
|
||||
|
@ -2190,7 +2190,8 @@ std::string CmdProxy::BurstMode(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[burst_internal or 0, burst_external or 1, cw_internal or 2, "
|
||||
"cw_external or 3]\n\t[Gotthard2] Default is burst_internal type"
|
||||
"cw_external or 3]\n\t[Gotthard2] Default is burst_internal "
|
||||
"type. Also changes clkdiv 2, 3, 4"
|
||||
<< '\n';
|
||||
} else {
|
||||
if (action == defs::GET_ACTION) {
|
||||
|
@ -11,4 +11,4 @@
|
||||
#define APIJUNGFRAU 0x220831
|
||||
#define APIMOENCH 0x220831
|
||||
#define APIMYTHEN3 0x220901
|
||||
#define APIGOTTHARD2 0x220901
|
||||
#define APIGOTTHARD2 0x220902
|
||||
|
Loading…
x
Reference in New Issue
Block a user