Dear all,
I am writing an application to capture the falling edge of GPIO27. The
program will enable GPIO_X interrupt and create an IST to handle it.
However, when there is falling edge on GPIO27, system hangs. It seems that
the IST is not installed properly. Would you suggest a method to verify that
the IST is installed or not? Are there any precaution for installing IST?

There are some information
-PXA270, mainstone III are used.
-IRQ number=10
-System Interrupt number=31,
getting from KernelIoControl(IOCTL_HAL_TRANSLATE_IRQ,

Thanks a lot

Re: System hang during interrupt by Valter

Valter
Wed Apr 12 05:08:06 CDT 2006

=?Utf-8?B?SEtBbnNvbg==?= <HKAnson@discussions.microsoft.com> wrote
in news:2D88B975-4408-41A4-A78A-BA8C139340F3@microsoft.com:

> Dear all,
> I am writing an application to capture the falling edge of GPIO27.
> The program will enable GPIO_X interrupt and create an IST to
> handle it. However, when there is falling edge on GPIO27, system
> hangs. It seems that the IST is not installed properly. Would
> you suggest a method to verify that the IST is installed or not?
> Are there any precaution for installing IST?

The interrupt on GPIO27 will report the same interrupt ID of the other
GPIO pins. Only GPIO0 and GPIO1 have a dedicate interrupt.
The IRQ handler on the mainstone BSP (I suppose that your BSP is based
on that BSP) handles GPIO_2XX in a particular way, calling a
BSPIRQHandler routine that should "convert" the physical IRQ code
returned by the PXA interrupt controller (IRQ_GPIO0,IRQ_GPIO1 or
IRQ_GPIO2XX) to a "virtual" physical interrupt (not the SYSINTR code)
that is connected to each external physical device that could generate
interrupts (ex: IRQ_ETHERNET, IRQ_PCMCIA0/1 etc.).
To handle your IRQ you should modify and rebuild the BSP.

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)

Re: System hang during interrupt by Voidcoder

Voidcoder
Wed Apr 12 05:35:10 CDT 2006

In addition to what Valter said, make sure GPIO27 is not
configured by the debug printing functions or serial driver
as alternate function 3 FFRTS (Full Function UART Request
To Send).

"Valter Minute" <vminute@GoogleMAILservice.com> wrote in message news:Xns97A37B7156C06VALTERMINUTE@207.46.248.16...
> =?Utf-8?B?SEtBbnNvbg==?= <HKAnson@discussions.microsoft.com> wrote
> in news:2D88B975-4408-41A4-A78A-BA8C139340F3@microsoft.com:
>
>> Dear all,
>> I am writing an application to capture the falling edge of GPIO27.
>> The program will enable GPIO_X interrupt and create an IST to
>> handle it. However, when there is falling edge on GPIO27, system
>> hangs. It seems that the IST is not installed properly. Would
>> you suggest a method to verify that the IST is installed or not?
>> Are there any precaution for installing IST?
>
> The interrupt on GPIO27 will report the same interrupt ID of the other
> GPIO pins. Only GPIO0 and GPIO1 have a dedicate interrupt.
> The IRQ handler on the mainstone BSP (I suppose that your BSP is based
> on that BSP) handles GPIO_2XX in a particular way, calling a
> BSPIRQHandler routine that should "convert" the physical IRQ code
> returned by the PXA interrupt controller (IRQ_GPIO0,IRQ_GPIO1 or
> IRQ_GPIO2XX) to a "virtual" physical interrupt (not the SYSINTR code)
> that is connected to each external physical device that could generate
> interrupts (ex: IRQ_ETHERNET, IRQ_PCMCIA0/1 etc.).
> To handle your IRQ you should modify and rebuild the BSP.
>
> --
> Valter Minute
> (the reply address of this message is invalid)
> (l'indirizzo di reply di questo messaggio non è valido)



Re: System hang during interrupt by HKAnson

HKAnson
Wed Apr 19 03:58:02 CDT 2006

Dear all,
Thanks for your information. The GPIO27 interrupt can be enabled and
without hang during interrupt. However, the system did not go my IST. There
are my findings.

When there is an interrupt (falling edge on GPIO27), the system goes to
UINT32 BSPIntrActiveIrq(UINT32 irq). I modified the code as following

UINT32 BSPIntrActiveIrq(UINT32 irq)
{ ...
...
switch(irq)
{
case IRQ_GPIO0:
irq = FPGAInterruptHandler(irq);
break;
case IRQ_GPIO1:
case IRQ_GPIOXX_2:
irq=IRQ_GPIO27;
OUTREG32((PULONG)&g_pGPIORegs->GEDR0,
0x08000000);
break
...
}
Are there any subroutines to be modified?

CPU: PXA270,
BSP: Intel PXA27x Dev Platform:ARMI_Release
are used.
Thanks alot!



"Valter Minute" wrote:

> =?Utf-8?B?SEtBbnNvbg==?= <HKAnson@discussions.microsoft.com> wrote
> in news:2D88B975-4408-41A4-A78A-BA8C139340F3@microsoft.com:
>
> > Dear all,
> > I am writing an application to capture the falling edge of GPIO27.
> > The program will enable GPIO_X interrupt and create an IST to
> > handle it. However, when there is falling edge on GPIO27, system
> > hangs. It seems that the IST is not installed properly. Would
> > you suggest a method to verify that the IST is installed or not?
> > Are there any precaution for installing IST?
>
> The interrupt on GPIO27 will report the same interrupt ID of the other
> GPIO pins. Only GPIO0 and GPIO1 have a dedicate interrupt.
> The IRQ handler on the mainstone BSP (I suppose that your BSP is based
> on that BSP) handles GPIO_2XX in a particular way, calling a
> BSPIRQHandler routine that should "convert" the physical IRQ code
> returned by the PXA interrupt controller (IRQ_GPIO0,IRQ_GPIO1 or
> IRQ_GPIO2XX) to a "virtual" physical interrupt (not the SYSINTR code)
> that is connected to each external physical device that could generate
> interrupts (ex: IRQ_ETHERNET, IRQ_PCMCIA0/1 etc.).
> To handle your IRQ you should modify and rebuild the BSP.
>
> --
> Valter Minute
> (the reply address of this message is invalid)
> (l'indirizzo di reply di questo messaggio non è valido)
>

Re: System hang during interrupt by Valter

Valter
Wed Apr 19 04:28:21 CDT 2006

=?Utf-8?B?SEtBbnNvbg==?= <HKAnson@discussions.microsoft.com> wrote
in news:33F48D06-E738-4C4B-92A5-0EA33D6AC370@microsoft.com:

[...]
> Are there any subroutines to be modified?
>

Yes.

> CPU: PXA270,
> BSP: Intel PXA27x Dev Platform:ARMI_Release
> are used.

You should modify also BSPInterruptEnable (to enable the IRQ),
BSPInterruptDisable (to disable it) and BSPInterruptDone (to re-enable
it after it has been handled by the IST).
The code IRQ_GPIO27, like the other IRQ_* codes is not the same code
that should be returned by the ISR. Those are defined as SYSINTR_*
codes.
You should define a new SYSINTR_* code for your device and use
OALIntrStaticTranslate to connect the two interrupt codes together in
BSPIntrInit.
All those functions are defined in intr.c under your BSP's src\kernel
\oal subdirectory.

In your application/driver code you can then use InterruptEnable
(SYSINTR_*,....) to enable your interrupt.

--
Valter Minute
(the reply address of this message is invalid)
(l'indirizzo di reply di questo messaggio non è valido)