Skip to content

Commit

Permalink
Add the EVM frac Synth reset function
Browse files Browse the repository at this point in the history
  • Loading branch information
rhong authored and jerzyjamroz committed Sep 16, 2024
1 parent 458fb43 commit 0053e86
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions evgMrmApp/Db/evgMrm.db
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,9 @@ record(mbbi, "$(P)TSGen-RB") {
field(ONVL, "0x1")
field(TWVL, "0x2")
}

record(bo,"$(P)ResetFracSynth-Cmd" ) {
field( DTYP, "Obj Prop command")
field( OUT , "@OBJ=$(OBJ), PROP=Reset Frac Synth")
field( DESC, "Reset")
}
1 change: 1 addition & 0 deletions evgMrmApp/src/evg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ OBJECT_BEGIN(evgMrm) {
OBJECT_PROP1("Frequency", &evgMrm::getFrequency);
OBJECT_PROP1("PLL Lock Status", &evgMrm::pllLocked);
OBJECT_PROP2("PLL Bandwidth", &evgMrm::getPLLBandwidth, &evgMrm::setPLLBandwidth);
OBJECT_PROP1("Reset Frac Synth",&evgMrm::resetFracSynth);
} OBJECT_END(evgMrm)
7 changes: 7 additions & 0 deletions evgMrmApp/src/evgMrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,13 @@ evgMrm::setEvtCode(epicsUInt32 evtCode) {
}

/** Access functions **/
void
evgMrm::resetFracSynth()
{
epicsUInt32 oldControlWord=READ32(m_pReg, FracSynthWord);
WRITE32(m_pReg, FracSynthWord, oldControlWord);
}


evgInput*
evgMrm::getInput(epicsUInt32 inpNum, InputType type) {
Expand Down
1 change: 1 addition & 0 deletions evgMrmApp/src/evgMrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class evgMrm : public mrf::ObjectInst<evgMrm>,
evgInput* getInput(epicsUInt32, InputType);
epicsEvent* getTimerEvent();
const bus_configuration* getBusConfiguration();
void resetFracSynth();

CALLBACK irqExtInp_cb;

Expand Down

0 comments on commit 0053e86

Please sign in to comment.