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:
#include <vxWorks.h>
#include <stdio.h>
#include <stdioLib.h>
#include <sockLib.h>
#include <inetLib.h>
#include <strLib.h>
#include <ioLib.h>
#include <intLib.h>
#include <iv.h>
#define Base_Addr 0xfbff0000
void init();
void test();
void isr();
void init()
{
unsigned char * pointer;
pointer=Base_Addr+0x83;
*pointer=0xe0; /* set the interrupt vector register*/
pointer=Base_Addr+0x81;
*pointer= 0x10; /* Board Software reset*/
pointer=Base_Addr+0x81;
*pointer=0x0B; /*board int enable*/
pointer=Base_Addr+0x85;
*pointer=0x10; /* board control register*/
printf("init finished now\n");
}
void test()
{
unsigned char * pointer;
init();
if(intConnect(INUM_TO_IVEC(0xe0),isr,0)==OK) /* intVector is set to 0xe0*/
printf("connect OK\n");
else
printf("Error\n");
sysIntEnable(4); /* int level set to 4*/
pointer=Base_Addr+0x81;
printf("the status reg is %x\n",*pointer);
return OK;
}
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? */
then the system reboot automatically, I don't know what's wrong with it. the External Trigger is
only a 1Hz square wave. Can any of you give me some advice ? Thank you.
Cheng Weixing from SSRF
- Replies:
- Re: Interrupt on MV2302 Marty Kraimer
- Navigate by Date:
- Prev:
Re: CAN questions Bernd Schoeneburg
- Next:
help about PENTEK 4284/4257 module? shen guobao
- 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
- Navigate by Thread:
- Prev:
Re: CAN questions Benjamin Franksen
- Next:
Re: Interrupt on MV2302 Marty Kraimer
- 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
|