Re: problem in IST event getting signalled by the OS
- From: "bluesphere" <ads_box@xxxxxxxxxxx>
- Date: Tue, 18 Apr 2006 22:26:38 +0200
Where did you initialize DeviceISTData.abort ??
"jukeboxjunky" <nimish.h@xxxxxxxxx> wrote in message
news:1145353266.790581.198140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,Global......................................................................
we are trying to write an I2C driver which needs receive interrupt to
be enabled.
we are using the Arm Xscale core (PXA27x) thus there is only one
interrupt handler(IRQHandler).
we are able to trap the interrupt within the IRQHandler and a proper
SYSIntr (as decided by us) is also returned to the kernel, which we
have been able to validate.
we then create an IST, create an event, call InitializeInterrupt, and
wait on the event created as per the pedagogy.
the problem right now is that the wait never yeilds, albeit to say that
event is never signalled by the OS. Any pointers on the above problem
would be appreciated. the code snippet of the IST is as below:
-----------------------------------------------------------
...........
Initialisation..............................................................
#define SYSINTR_I2C 30
typedef struct ISTData // Declare the Structure to pass to IST
{
HANDLE hThread; // IST Handle
DWORD sysIntr; // Logical ID
HANDLE hEvent; // handle to the IST event
volatile BOOL abort; // flag to test to exit the IST
DWORD Priority;
}ISTData;
Driver
.....
Thread......................................................................
ISTData g_DeviceISTData;// Create event to link to IST
g_DeviceISTData.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
if(g_DeviceISTData.hEvent != NULL)
{
InterruptInitialize(SYSINTR_I2C, g_DeviceISTData.hEvent, 0, 0);
}
g_DeviceISTData.sysIntr = SYSINTR_I2C;
g_DeviceISTData.Priority = 250;
g_DeviceISTData.hThread = CreateThread(NULL,0, &DeviceIST,
&g_DeviceISTData, 0, NULL);
...........
DWORD DeviceIST(void *dat)
{
ISTData* pData= (ISTData*)dat;
CeSetThreadPriority(GetCurrentThread(), pData->Priority);
while(!pData->abort)
{
// wait for the interrupt event...
WaitForSingleObject(pData->hEvent, INFINITE)
//Our code is here
//Done the interrupt job
InterruptDone(pData->sysIntr);
}
return 0;
}
-------------------------------------------------------------
.
- Follow-Ups:
- Re: problem in IST event getting signalled by the OS
- From: jukeboxjunky
- Re: problem in IST event getting signalled by the OS
- From: jukeboxjunky
- Re: problem in IST event getting signalled by the OS
- References:
- problem in IST event getting signalled by the OS
- From: jukeboxjunky
- problem in IST event getting signalled by the OS
- Prev by Date: Re: USB/RNDIS
- Next by Date: Re: Visual Studio 2005, Platform Builder 5, and Windows CE drivers
- Previous by thread: Re: problem in IST event getting signalled by the OS
- Next by thread: Re: problem in IST event getting signalled by the OS
- Index(es):
Relevant Pages
|