M3: software trigger (#175)

This commit is contained in:
Dhanya Thattil
2020-09-10 10:15:45 +02:00
committed by GitHub
parent d011186b9a
commit 3cd4f3897b
11 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