From: Tianchi Huang <gz.eddie.htc@gmail.com>
To: xenomai@xenomai.org
Subject: [Xenomai] Xenomai 3.0-rc3 Interruption on Arietta G25 (AT91SAM9G25 chip)
Date: Mon, 23 Mar 2015 12:07:43 +0100 [thread overview]
Message-ID: <CAJT0owGYuZ8L47AKM0FdjOw5x3g0cjXcXAFPaL91TaxMun6WBw@mail.gmail.com> (raw)
*Hello,*
*I'm now working on project using Arietta G25 board (AT91SAM9G25 chip) on
which i need to capture 1000 interruptions per second of an external ADC. *
*I have patched the kernel 3.14.17 with the patch ipipe-core-3.14.17-arm-5
which i found on GNA. The compilation passed and Xenomai seems to run all
right. The latency test gave me about 100us as worst value. *
*I make un modele of interruption test as below*
#include <linux/fs.h>
#include <linux/fcntl.h>
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <rtdm/driver.h>
#define GPIO_IN 27
static rtdm_irq_t irq_rtdm;
static int handler_interruption(rtdm_irq_t * irq){
printk(KERN_ALERT "IRQ received!\n");
return RTDM_IRQ_HANDLED;
}
static int __init exemple_init (void){
int err;
int num_interruption;
if ((err = gpio_request(GPIO_IN, "test_irq")) != 0) {
return err;
}
if ((err = gpio_direction_input(GPIO_IN)) != 0) {
gpio_free(GPIO_IN);
return err;
}
numero_interruption = gpio_to_irq(GPIO_IN);
irq_set_irq_type(numero_interruption, IRQF_TRIGGER_FALLING);
if ((err = rtdm_irq_request(& irq_rtdm, num_interruption,
handler_interruption, RTDM_IRQTYPE_EDGE, "test_irq", NULL)) != 0) {
gpio_free(GPIO_IN);
return err;
}
printk(KERN_ALERT "Driver registed\n");
rtdm_irq_enable(& irq_rtdm);
return 0;
}
static void __exit exemple_exit (void){
rtdm_irq_disable(& irq_rtdm);
rtdm_irq_free(&irq_rtdm);
gpio_free(GPIO_IN);
}
module_init(exemple_init);
module_exit(exemple_exit);
MODULE_LICENSE("GPL");
*It seems that it has been registed and run without no error, as you can
see just here:*
root@arietta:/home# cat /proc/xenomai/irq
IRQ CPU0
17: 1 [timer/0]
28: 0 test_irq
1027: 0 [virtual]
root@arietta:/home# cat /proc/interrupts
CPU0
16: 31031 AIC 1 at91_tick, at91_rtc, ttyS0
18: 1579 AIC 20 at_hdmac
19: 0 AIC 21 at_hdmac
23: 15338 AIC 12 f0008000.mmc
25: 0 AIC 14 f0004000.spi
26: 20732 AIC 23 atmel_usba_udc
27: 8119 AIC 22 ehci_hcd:usb1, ohci_hcd:usb2
28: 1 GPIO 27
Err: 0
*But, when i generate a signal on GPIO 27, i can see the counter of
/proc/interrupts increase but not the counter of /proc/xenomai/irq nor the
message i put in the interrupt handler, as you can see below:*
root@arietta:/home# cat /proc/xenomai/irq
IRQ CPU0
17: 1 [timer/0]
28: 0 test_irq
1027: 0 [virtual]
root@arietta:/home# cat /proc/interrupts
CPU0
16: 31031 AIC 1 at91_tick, at91_rtc, ttyS0
18: 1579 AIC 20 at_hdmac
19: 0 AIC 21 at_hdmac
23: 15338 AIC 12 f0008000.mmc
25: 0 AIC 14 f0004000.spi
26: 20732 AIC 23 atmel_usba_udc
27: 8119 AIC 22 ehci_hcd:usb1, ohci_hcd:usb2
28: 5459 GPIO 27
Err: 0
*Do you have any idea of that? I've tried Xenomai 2.6.4 too, but i had the
same problem. Hope you can help me with this.*
*Best regards,*
*Eddie HUANG*
next reply other threads:[~2015-03-23 11:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 11:07 Tianchi Huang [this message]
2015-03-23 22:09 ` [Xenomai] Xenomai 3.0-rc3 Interruption on Arietta G25 (AT91SAM9G25 chip) Gilles Chanteperdrix
2015-03-24 15:55 ` Tianchi Huang
2015-03-24 16:01 ` Gilles Chanteperdrix
2015-03-24 16:13 ` Gilles Chanteperdrix
2015-03-25 8:58 ` Tianchi Huang
[not found] ` <CAJT0owE7vtJDWM289=4cNR_LuUqPWAO60nvg9D0NiTQWeN9Xbg@mail.gmail.com>
2015-03-26 14:31 ` Gilles Chanteperdrix
2015-03-26 14:52 ` Tianchi Huang
2015-03-26 14:54 ` Gilles Chanteperdrix
2015-03-26 15:19 ` Tianchi Huang
2015-03-26 15:40 ` Tianchi Huang
2015-03-26 15:44 ` Gilles Chanteperdrix
2015-03-26 15:58 ` Tianchi Huang
2015-03-26 16:00 ` Gilles Chanteperdrix
2015-03-26 16:26 ` Tianchi Huang
2015-03-26 16:35 ` Gilles Chanteperdrix
2015-03-26 16:40 ` Gilles Chanteperdrix
2015-03-26 16:56 ` Tianchi Huang
2015-03-26 16:57 ` Gilles Chanteperdrix
2015-03-26 17:25 ` Tianchi Huang
2015-03-26 14:32 ` Gilles Chanteperdrix
2015-03-26 17:08 ` Paul Janzen
2015-03-26 18:30 ` Gilles Chanteperdrix
2015-03-26 18:51 ` Paul Janzen
2015-03-26 18:58 ` Gilles Chanteperdrix
2015-03-26 19:32 ` Paul Janzen
2015-03-26 19:52 ` 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=CAJT0owGYuZ8L47AKM0FdjOw5x3g0cjXcXAFPaL91TaxMun6WBw@mail.gmail.com \
--to=gz.eddie.htc@gmail.com \
--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.