EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Interrupt on MV2302
From: Marty Kraimer <[email protected]>
To: Weixing Cheng <[email protected]>
Cc: [email protected]
Date: Mon, 16 Apr 2001 08:22:31 -0500
Weixing Cheng wrote:
> 
> hello, There has something with my system when using interrupt.
> The system is like this :
> Mv2302 CPU board + Avme9321 12 bit I/O card.
> I tried to use External Trigger of Avme9321 and wrote a simple pure vxWorks program:

...

> void isr()
> {
>  unsigned char * pointer;
>  pointer=Base_Addr+0x81;
>  *pointer=0x03;  /*int disable*/
>  sysIntDisable(4);
>  logMsg("The isr is running...\n");
>  *pointer=0x0B;  /*int enable*/
>  sysIntEnable(4);
>  return OK;
> }
> 
> make and ld it. run test() routine. and then I give a external trigger to Avme9321. the
> message is like this:
> 
> Interrupt: The isr is running
> Interrupt: The isr is running
> Interrupt: T
>                                          /* it seems the isr is runing, but only
>                                          last for several times and get a overflow message,
>                                           and reboot the system*/
> 
> WorkQPanic: Kernel work queue overflow        /* what does this mean? */



In this case the Kernel work queue overflow is most likely because the interrupt
is always pending.
Look at the documentation for the Avme9321. You probably have to access some
register in order to acknowledge the interrupt. Until you acknowledge the
interrupt it will continue being asserted even though your interrupt routine was
executed. For many devices just reading a data register is enough. Sometimes you
have to write to an interrupt acknowledge register.

For example the interrupt routine for the avme9444 is

STATIC void avme9440_isr(struct ioCard *pc)
{
   volatile struct avme9440                *p = pc->card;
   volatile unsigned char         intStatusLocal = p->intStatus;
   unsigned int                   chanNum;
   volatile unsigned char         intStatWrite = 0;

   for (chanNum=0; chanNum <= 7; chanNum++)
   {
      if(intStatusLocal & (1 << chanNum))
      {
         scanIoRequest(pc -> ioscanpvt[chanNum]);
         intStatWrite |= (1 << chanNum);
      }
   }

   p->intStatus = intStatWrite;
}

I will guess that the last instruction is what constitutes the interrupt
acknowledge.

Marty Kraimer


References:
Interrupt on MV2302 Weixing Cheng

Navigate by Date:
Prev: help about PENTEK 4284/4257 module? shen guobao
Next: [Fwd: Interrupt Epics Driver] Wolfgang Maschmann
Index: 1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Interrupt on MV2302 Weixing Cheng
Next: help about PENTEK 4284/4257 module? shen guobao
Index: 1994  1995  1996  1997  1998  1999  2000  <20012002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·