Re: problem in IST event getting signalled by the OS



Where did you initialize DeviceISTData.abort ??

"jukeboxjunky" <nimish.h@xxxxxxxxx> wrote in message
news:1145353266.790581.198140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

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:

-----------------------------------------------------------


Global......................................................................
...........

#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

Initialisation..............................................................
.....

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);



Thread......................................................................
...........

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;

}

-------------------------------------------------------------



.



Relevant Pages

  • Re: [PATCH] AMD Thermal Interrupt Support
    ... Touching config space from interrupt context is legal, ... * AMD-specific thermal interrupt handler. ... * Initialize each northbridge's thermal throttling logic. ... If so, initialize them for receiving the same, then perform ...
    (Linux-Kernel)
  • Re: Compare interrupt service of F2812
    ... >> could anyone help me on how write this comapre interrupt service to ... interrupt void PWM_Compare_isr; ... Initialize System Control: ... // This is needed to write to EALLOW protected registers ...
    (comp.dsp)
  • Re: Texas Instruments TMS320F2812
    ... Clear all interrupts and initialize PIE vector table: ... // Initialize PIE control registers to their default state. ... // Disable CPU interrupts and clear all CPU interrupt flags: ... // Enable Period interrupt bits for GP timer 1 ...
    (comp.dsp)
  • Re: Parallel port interrupt revisited
    ... your error should be found during compile. ... compiler output does not even try to compile the parallel port driver. ... -It is better if you first set up all your interrupt stuff, ... NULL)) // Initialize IRQ 7 and map it to the hIntPar event ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CF Modem Problems
    ... The Serial driver MDD will initialize the interrupt only when an app ... > 58274 Tapi initialized. ...
    (microsoft.public.windowsce.platbuilder)