Experimental Physics and Industrial Control System
Subject: |
vxWorks, IP-OCTAL-232, interrupt, and reboot |
From: |
John Dobbins <[email protected]> |
To: |
EPICS Tech-Talk <[email protected]> |
Date: |
Thu, 22 Mar 2007 13:54:18 -0400 |
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;
}
- Replies:
- RE: vxWorks, IP-OCTAL-232, interrupt, and reboot Mark Rivers
- What's wrong if a PV with DISA=1 still processes? Dayle Kotturi
- Navigate by Date:
- Prev:
Re: Another Dual NICs question Ralph Lange
- Next:
CALC record weird behaviour Oleg A. Makarov
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: EPICS/BluIce gateways Wayne Lewis
- Next:
RE: vxWorks, IP-OCTAL-232, interrupt, and reboot Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025