>> Hi,
>>
>> I installed xenomai on an overo water board (cortex A8) and performed
>> latency tests.

>What version of Xenomai?

>> I tested two modules.
>> The first module is based on an internal timer. It toggles a GPIO each
>> 1ms.
>> The second module waits for an external interrupt from an input GPIO
>> (square signal at 1KHz). When that happens, the module toggles a GPIO pin.
>>
>> When i load the system and do a transfer from Ethernet to the sd card the
>> first module works fine with a maximum latency less than 50us.
>> But the second module, in the same context, have a maximum latency of
>> several milliseconds.
>>
>> As the first module works fine i think i have a problem with the hardware
>> configuration like the hardware irq priority.
>> In the irq.c file, the irq priority level is not set for the linux domain.
>>
>> Should i configure the irq level at the initialization of the board ? What
>> else could cause this issue ?

>The error is more likely in the code of your driver. Show us the code.

Hi Gilles,


Sorry, i forgot the essential.
My linux kernel version is the 2.6.38 from sakoman. 
My xenomai version is xenomai-2.6.0
The adeos patch is : adeos-ipipe-2.6.38.8-arm-1.18-04.patch ( 
./prepare-kernel.sh --linux=${WORKDIR}/git --arch=arm 
--adeos=${WORKDIR}/xenomai-2.6.0/ksrc/arch/arm/patches/adeos-ipipe-2.6.38.8-arm-1.18-04.patch).
The xenomai user space is make with the next configuration : 
 ./configure --build=arm-ti-linux --host=arm-none-linux-gnueabi --prefix=/usr 
--includedir=/usr/include/xenomai  --enable-arm-tsc=omap3   --disable-dox-doc 
--disable-dbx LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"


The module code is :

For the init of the module:
---------------------------------------------------------------------------------------------------------------------------------
if (!(((gpio_request(RX_TST_GPIO,"RX_TST_GPIO") == 0) &&
                (gpio_direction_input(RX_TST_GPIO) == 0)))) {
                rtdm_printk(KERN_DEBUG "Could not claim GPIO for 
TX_SPACE_AVAILABLE_GPIO\n");
                erreur_return |= 1;
                return -1;
        }

        if (!(((gpio_request(TX_TST_GPIO,"RX_TST_GPIO") == 0) &&
                (gpio_direction_output(TX_TST_GPIO,0) == 0)))) {
                rtdm_printk(KERN_DEBUG "Could not claim GPIO for 
TX_SPACE_AVAILABLE_GPIO\n");
                erreur_return |= 2;
                return -1;
        } 


        ret = request_irq(gpio_to_irq(RX_TST_GPIO),
                        space_available_irqhandler,
                IRQF_TRIGGER_FALLING|IRQF_DISABLED, "usrp_intr_aviable", NULL);
        if((ret!=0)){ rtdm_printk(KERN_DEBUG "Could not request irq\n"); 
erreur_return |= 4;}

        disable_irq(gpio_to_irq(RX_TST_GPIO));
        free_irq(gpio_to_irq(RX_TST_GPIO), NULL);

        err = rtdm_irq_request(&rt_irq_handle, gpio_to_irq(RX_TST_GPIO), 
rt_data_ready_irqhandler, RTDM_IRQTYPE_EDGE, "XENO_IRQ_RECEIVE",NULL);
        err = rtdm_irq_enable(&rt_irq_handle);

The irq code is:
---------------------------------------------------------------------------------------------------------------------------------
static int rt_data_ready_irqhandler(rtdm_irq_t *irq_handle) 
{
                
        iomask ^= 1;
        gpio_set_value(TX_TST_GPIO, iomask);
        
        return RTDM_IRQ_HANDLED;
}


Thanks for your help.

JP


_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to