Skip to content

Commit

Permalink
fix: EVRU/D use the irqpoller until the isr is implemented.
Browse files Browse the repository at this point in the history
Until EVM-EVRU/D interrupts are implemented in the EVM, the
irqpoller will be delivering the capability.
  • Loading branch information
jerzyjamroz committed Jan 4, 2024
1 parent 61a1533 commit 190f6b3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion evgMrmApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LIBRARY_IOC += evgmrm
# INC += evgOutput.h
# INC += mrmevgseq.h

SRC_DIRS += ../devSupport
SRC_DIRS += ../devSupport

#All the source files that are compiled and put in the library.
evgmrm_SRCS += evgInit.cpp
Expand Down
12 changes: 7 additions & 5 deletions evgMrmApp/src/evgInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ evgShutdown(void*)
mrf::Object::visitObjects(&disableIRQ,0);
}

static void
static void
inithooks(initHookState state) {
epicsUInt8 lvl;
switch(state) {
Expand Down Expand Up @@ -225,7 +225,7 @@ mrmEvgSetupVME (
printf("##### Setting up MRF EVG in VME Slot %d #####\n",slot);
printf("Found Vendor: %08x\nBoard: %08x\nRevision: %08x\n",
info.vendor, info.board, info.revision);

epicsUInt32 xxx = CSRRead32(csrCpuAddr + CSR_FN_ADER(1));
if(xxx)
printf("Warning: EVG not in power on state! (%08x)\n", xxx);
Expand Down Expand Up @@ -536,6 +536,8 @@ mrmEvgSetupPCI (
delete evg;
return -1;
} else {
new IRQPoller(&EVRMRM::isr_poll, static_cast<void *>(evg->getEvruMrm()), 0.1);
new IRQPoller(&EVRMRM::isr_poll, static_cast<void *>(evg->getEvrdMrm()), 0.1);
printf("PCI interrupt connected!\n");
}

Expand All @@ -562,7 +564,7 @@ static const iocshArg * const mrmEvgSetupVMEArgs[5] = { &mrmEvgSetupVMEArg0,
static const iocshFuncDef mrmEvgSetupVMEFuncDef = { "mrmEvgSetupVME", 5,
mrmEvgSetupVMEArgs };

static void
static void
mrmEvgSetupVMECallFunc(const iocshArgBuf *args) {
mrmEvgSetupVME(args[0].sval,
args[1].ival,
Expand Down Expand Up @@ -750,15 +752,15 @@ reportCard(mrf::Object* obj, void* arg) {
}

evg->show(*level);

if(*level >= 2)
printregisters(evg->getRegAddr());

printf("\n");
return true;
}

static long
static long
report(int level) {
printf("=== Begin MRF EVG support ===\n");
mrf::Object::visitObjects(&reportCard, (void*)&level);
Expand Down
7 changes: 5 additions & 2 deletions evgMrmApp/src/evgMrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#include "drvem.h"

/*********
* Each EVG will be represented by the instance of class 'evgMrm'. Each evg
* Each EVG will be represented by the instance of class 'evgMrm'. Each evg
* object maintains a list to all the evg sub-componets i.e. Event clock,
* Software Events, Trigger Events, Distributed bus, Multiplex Counters,
* Software Events, Trigger Events, Distributed bus, Multiplex Counters,
* Input, Output etc.
*/
class wdTimer;
Expand Down Expand Up @@ -198,6 +198,9 @@ class evgMrm : public mrf::ObjectInst<evgMrm>,
// EVM only
mrf::auto_ptr<FCT> fct;
mrf::auto_ptr<EVRMRM> evru, evrd;
public:
EVRMRM *getEvruMrm() const { return evru.get(); } // EVRU MRM accessor
EVRMRM *getEvrdMrm() const { return evrd.get(); } // EVRD MRM accessor
};

#endif //EVG_MRM_H
2 changes: 1 addition & 1 deletion mrfCommon/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ mrfCommon_SRCS += mrfCommon.cpp
mrfCommon_SRCS += spi.cpp
mrfCommon_SRCS += flash.cpp
mrfCommon_SRCS += flashiocsh.cpp
#NOTINUSE: mrfCommon_SRCS += pollirq.cpp
mrfCommon_SRCS += pollirq.cpp #MTCA EVM EVRU/D usage

mrfCommon_LIBS += $(EPICS_BASE_IOC_LIBS)

Expand Down

0 comments on commit 190f6b3

Please sign in to comment.