Philippe,

Indeed it was a problem with __set_irq_handler() not assigning appropriate handlers, since this board doesn't fall into any of the existing handler categories.

Thanks for your help.

James


On Wed, Sep 16, 2009 at 10:47 AM, Philippe Gerum <rpm@xenomai.orgai.org> wrote:
On Tue, 2009-09-15 at 10:27 -0500, James Kilts wrote:
> I'm porting Xenomai/I-pipe to the NS921x (an arm9-based) platform, but
> I'm having problems getting the interrupts to re-enable after the
> first interrupt triggers.
>
> A kernel driver module is being used to test the interrupt latency
> using an input GPIO pin which triggers a dedicated external IRQ, to
> which the ISR responds by toggling a different GPIO pin.  I realize
> that there are test applications which do very similar things, and
> that the RTDM skin is preferable over the native API.  Still, I would
> like to understand why the interrupt is not being properly
> acknowledged and reset.
>
> If the ISR manually performs the ACK and EOI using platform specific
> calls, subsequent interrupts are handled properly.  My understanding
> was that Xenomai should re-enable the interrupt for processing without
> such intervention.  How do I force Xenomai to clear and re-enable the
> interrupt to handle subsequent interrupts?

It looks like an I-pipe issue, not a Xenomai one. Xenomai asks the
I-pipe to re-enable the interrupt line via the ipipe_end() handler, and
for some reason, that handler does not seem to do the right thing on
your board.

Which I-pipe patch are you using (kernel version and I-pipe release)?

>
> Thanks,
> James
>
>
>
> static int __init turnaround_irq_measure_init(void)
> {
>     ....
>
>     retval = rt_intr_create(&irq_response_desc,
> "ns9xxx_measure_irq_rt_response",
>                             TURNAROUND_INPUT_IRQ,
> turnaround_irq_measure_response,
>                             NULL, NULL);
>
>     if (retval == 0)  // 0 is success
>     {
>         set_irq_type(TURNAROUND_INPUT_IRQ, IRQ_TYPE_EDGE_FALLING);
>         retval = rt_intr_enable(&irq_response_desc);
>
>         if (retval != 0)  // 0 is success
>         {
>             console_print("Turnaround test driver rt interrupt enable:
> FAILED\n");
>         }
>     }
>     else
>     {
>         console_print("Turnaround test driver rt interrupt create:
> FAILED\n");
>     }
>
>     return 0;
> }
>
>
> static int turnaround_irq_measure_response(struct xnintr *intr)
> {
>     /* Set GPIO pin low */
>     gpio_set_value(TURNAROUND_OUTPUT_GPIO, 0);
>
>     /* Wait 50 microseconds */
>     rt_timer_spin(50000);
>
>     /* Set GPIO pin high */
>     gpio_set_value(TURNAROUND_OUTPUT_GPIO, 1);
>
>     /* Start listening again */
>     /* NOTE:  These two lines should not be necessary */
>     ns9xxx_ack_irq(TURNAROUND_INPUT_IRQ);
>     ns9xxx_eoi_irq(TURNAROUND_INPUT_IRQ);
>
>     return RT_INTR_HANDLED;
> }
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.