m3:software trigger

This commit is contained in:
maliakal_d 2020-09-08 15:45:35 +02:00
parent e1e04ee755
commit 67f1f9924a
6 changed files with 14 additions and 4 deletions

View File

@ -129,6 +129,10 @@
#define CONTROL_STP_ACQSTN_MSK (0x00000001 << CONTROL_STP_ACQSTN_OFST)
#define CONTROL_STRT_PATTERN_OFST (2)
#define CONTROL_STRT_PATTERN_MSK (0x00000001 << CONTROL_STRT_PATTERN_OFST)
#define CONTROL_STRT_READOUT_OFST (3) // not connected in software yet
#define CONTROL_STRT_READOUT_MSK (0x00000001 << CONTROL_STRT_READOUT_OFST)
#define CONTROL_STRT_SW_TRIGGER_OFST (4)
#define CONTROL_STRT_SW_TRIGGER_MSK (0x00000001 << CONTROL_STRT_SW_TRIGGER_OFST)
#define CONTROL_CRE_RST_OFST (10)
#define CONTROL_CRE_RST_MSK (0x00000001 << CONTROL_CRE_RST_OFST)
#define CONTROL_PRPHRL_RST_OFST (11) // Only GBE10?

View File

@ -2318,6 +2318,12 @@ int stopStateMachine() {
return OK;
}
int softwareTrigger() {
LOG(logINFO, ("Sending Software Trigger\n"));
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_STRT_SW_TRIGGER_MSK);
return OK;
}
enum runStatus getRunStatus() {
LOG(logDEBUG1, ("Getting status\n"));
// scan error or running

View File

@ -557,7 +557,7 @@ int startStateMachine();
void *start_timer(void *arg);
#endif
int stopStateMachine();
#ifdef EIGERD
#if defined(EIGERD) || defined(MYTHEN3D)
int softwareTrigger();
#endif

View File

@ -4107,7 +4107,7 @@ int software_trigger(int file_des) {
memset(mess, 0, sizeof(mess));
LOG(logDEBUG1, ("Software Trigger\n"));
#ifndef EIGERD
#if !defined(EIGERD) && !defined(MYTHEN3D)
functionNotImplemented();
#else
// only set

View File

@ -457,7 +457,7 @@ class Detector {
* numbers for different modules.*/
void setStartingFrameNumber(uint64_t value, Positions pos = {});
/** [Eiger] Sends an internal software trigger to the detector */
/** [Eiger][Mythen3] Sends an internal software trigger to the detector */
void sendSoftwareTrigger(Positions pos = {});
Result<defs::scanParameters> getScan(Positions pos = {}) const;

View File

@ -1633,7 +1633,7 @@ class CmdProxy {
EXECUTE_SET_COMMAND(
trigger, sendSoftwareTrigger,
"\n\t[Eiger] Sends software trigger signal to detector.");
"\n\t[Eiger][Mythen3] Sends software trigger signal to detector.");
GET_COMMAND(scanerrmsg, getScanErrorMessage,
"\n\tGets Scan error message if scan ended in error for non "