Skip to content

Commit e84b748

Browse files
committed
WIP Debugging FIFO Reset
1 parent 34cc684 commit e84b748

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

evrApp/Db/evrbase.db

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,3 +515,9 @@ record(mbbi, "$(P)PLL-Bandwidth-RB") {
515515
field( THVL, "3")
516516
field( FRVL, "4")
517517
}
518+
519+
record(bo, "$(P)ResetFIFO") {
520+
field(DESC, "Apply DC correction")
521+
field(DTYP, "Obj Prop bool")
522+
field(OUT, "@OBJ=$(OBJ), PROP=RESETFifo")
523+
}

evrMrmApp/src/drvem.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,6 +1003,20 @@ EVRMRM::dcEnable(bool v)
10031003
BITCLR32(base, Control, Control_DCEna);
10041004
}
10051005

1006+
1007+
bool
1008+
EVRMRM::resetfifoRB() const
1009+
{
1010+
return 1;
1011+
}
1012+
1013+
void
1014+
EVRMRM::resetfifo(bool v)
1015+
{
1016+
printf("\n\n\n RESETING FIFO -- function \n\n\n ");
1017+
BITSET(NAT,32, base, Control, Control_fiforst);
1018+
}
1019+
10061020
double
10071021
EVRMRM::dcTarget() const
10081022
{
@@ -1118,6 +1132,7 @@ void EVRMRM::setTimeSrc(epicsUInt32 raw)
11181132
OBJECT_BEGIN2(EVRMRM, EVR)
11191133
OBJECT_PROP2("Clock Mode", &EVRMRM::clockMode, &EVRMRM::clockModeSet);
11201134
OBJECT_PROP2("DCEnable", &EVRMRM::dcEnabled, &EVRMRM::dcEnable);
1135+
OBJECT_PROP2("RESETFifo", &EVRMRM::resetfifoRB, &EVRMRM::resetfifo);
11211136
OBJECT_PROP2("DCTarget", &EVRMRM::dcTarget, &EVRMRM::dcTargetSet);
11221137
OBJECT_PROP1("DCRx", &EVRMRM::dcRx);
11231138
OBJECT_PROP1("DCInt", &EVRMRM::dcInternal);
@@ -1423,6 +1438,7 @@ EVRMRM::drain_fifo()
14231438
if (status&(IRQ_FIFOFull|IRQ_RXErr)) {
14241439
// clear fifo if link lost or buffer overflow
14251440
BITSET(NAT,32, base, Control, Control_fiforst);
1441+
printf("\n\n\n RESETING FIFO \n\n\n ");
14261442
}
14271443

14281444
int iflags=epicsInterruptLock();

evrMrmApp/src/drvem.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ class epicsShareClass EVRMRM : public mrf::ObjectInst<EVRMRM, EVR>,
211211

212212
bool dcEnabled() const;
213213
void dcEnable(bool v);
214+
215+
bool resetfifoRB() const;
216+
void resetfifo(bool v);
217+
214218
double dcTarget() const;
215219
void dcTargetSet(double);
216220
//! Measured delay

0 commit comments

Comments
 (0)