EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: vxWorks, IP-OCTAL-232, interrupt, and reboot
From: John Dobbins <[email protected]>
To: Mark Rivers <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Thu, 22 Mar 2007 14:18:20 -0400
Thanks Mark. I can do that! John

Mark Rivers wrote:
You need to disable the interrupts before issuing the reboot.  You can
do this automatically by adding a reboot-hook function in your driver.

Mark


-----Original Message-----
From: John Dobbins [mailto:[email protected]] Sent: Thursday, March 22, 2007 11:54 AM
To: EPICS Tech-Talk
Subject: vxWorks, IP-OCTAL-232, interrupt, and reboot


Dear All,

I am trying to create device support for doing data acquisition that is synchronous with the AC line. I happen to have an IP-OCTAL-232 which has some general purpose inputs which can be used to generate interrupts so I am using a pulser synchronized to the AC to trigger the IP-OCTAL.

I have installed the IP-OCTAL on an MVME-162 running VxWorks 5.4 and EPICS 3-13-10. Everything appears to work in that the interrupt handler gets called (right now the interrupt handler simply clears the interrupt source and increments a counter). However if I then type "reboot" at the VxWorks console it hangs. If I first disconnect the interrupt source (pulser) before typing "reboot" then it does not hang.

Any ideas on what would prevent reboot from occurring?


Regards and thanks,


John Dobbins
Lab for Elementary Particle Physics
Cornell University





I am not currently using drvIpac though I copied from drvIpMv162.c :

This code sets up the interrupt:

int acClkSetup( ) {

int slot;

    /* Initialise the IPIC chip */
    for (slot = 0; slot < IPIC_SLOTS; slot++) {
       ipic->intCtrl[slot][0] = IPIC_INT_ICLR;
       ipic->intCtrl[slot][1] = IPIC_INT_ICLR;
       ipic->genCtrl[slot] = IPIC_GEN_WIDTH_8;
    }

/* using ipac interrupt request line 0 */
ipic->intCtrl[IP_OCTAL_IPIC_SLOT][0] = (AC_CLK_ILVL & IPIC_INT_LEVEL)
| (ipic->intCtrl[IP_OCTAL_IPIC_SLOT][0] & ~IPIC_INT_LEVEL);


/* setup memory space for the ipac, interrupt vector goes into memory space on MVME-162 */
ipic->memBase[IP_OCTAL_IPIC_SLOT] = 0x8000;
ipic->memSize[IP_OCTAL_IPIC_SLOT] = 0;
ipic->genCtrl[IP_OCTAL_IPIC_SLOT] |= IPIC_GEN_MEN;


/* install the interrupt handler */
if (intConnect(INUM_TO_IVEC(AC_CLK_IVEC), acClkMain, 0) == ERROR) {
perror(" Unable to install AC clock interrupt handler\n");
return -1;
}


    /* setup SCC2698 interrupt mask register */
    *((char *)IP_OCTAL_IMRA_REG)    = (char)IP_OCTAL_IMRA_VALUE;

    /* ivec goes to first byte of ipac mem space */
    *((char *)0x80000000)           = (char) AC_CLK_IVEC;

    /* setup Aux. Control Register */
    *((char *)IP_OCTAL_ACRA_REG)    = (char)IP_OCTAL_ACRA_VALUE;

    /* enable interrupts on ipic */
    ipic->intCtrl[IP_OCTAL_IPIC_SLOT][0] |= IPIC_INT_ICLR;
    ipic->intCtrl[IP_OCTAL_IPIC_SLOT][0] |= IPIC_INT_IEN;

sysIntEnable(AC_CLK_ILVL);

printf(" Setup AC Clk Interrupt\n");

    return 0;
}




the interrupt handler



unsigned int cnt = 0; volatile char temp;


void acClkMain() {

   /* clear interrupt */
   temp = *((char *)IP_OCTAL_ACRA_REG);

cnt++;

   return;
}


References:
RE: vxWorks, IP-OCTAL-232, interrupt, and reboot Mark Rivers

Navigate by Date:
Prev: RE: vxWorks, IP-OCTAL-232, interrupt, and reboot Mark Rivers
Next: Re: .cmd file downloading problem Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: vxWorks, IP-OCTAL-232, interrupt, and reboot Mark Rivers
Next: What's wrong if a PV with DISA=1 still processes? Dayle Kotturi
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·