All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: James Kilts <jameskilts@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Interrupt only runs once
Date: Wed, 16 Sep 2009 17:47:24 +0200	[thread overview]
Message-ID: <1253116044.2676.153.camel@domain.hid> (raw)
In-Reply-To: <9aa019ba0909150827u38360ec1m7b749838ab0c54c4@domain.hid>

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.




  reply	other threads:[~2009-09-16 15:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 15:27 [Xenomai-help] Interrupt only runs once James Kilts
2009-09-16 15:47 ` Philippe Gerum [this message]
2009-09-17 17:26   ` James Kilts
2009-09-17 17:31     ` Gilles Chanteperdrix
2009-09-17 17:39     ` Gilles Chanteperdrix
2009-09-17 20:45       ` James Kilts
2009-09-17 20:58         ` Gilles Chanteperdrix
2009-09-24 18:46           ` James Kilts
2009-09-24 18:58             ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1253116044.2676.153.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=jameskilts@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.