I'm not seeing the latency command on my board. Is it part of xenomai? I'm
using buildroot for my filesystem.


On Mon, Jan 6, 2014 at 2:11 PM, Gilles Chanteperdrix <
gilles.chanteperd...@xenomai.org> wrote:

> On 01/06/2014 10:54 PM, Gilles Chanteperdrix wrote:
> > On 01/06/2014 10:52 PM, Nima Nourozi wrote:
> >> On Mon, Jan 6, 2014 at 1:45 PM, Gilles Chanteperdrix <
> >> gilles.chanteperd...@xenomai.org> wrote:
> >>
> >>> On 01/06/2014 08:10 PM, Nima Nourozi wrote:
> >>>> Here is the task initialization code:
> >>>>
> >>>> *rtdm_printk("kicking of tasklet...\n");*
> >>>> * retval = rtdm_task_init(&heartbeat_task, "spi_transfer",
> >>>> xx_start_transfer, NULL, 99, 100000000 /* 100 ms */);*
> >>>> * __ipipe_serial_debug("*******return value = %d\n", retval);*
> >>>> * if(retval)*
> >>>> * {*
> >>>> * __ipipe_serial_debug("error initializing task: %i\n", retval);*
> >>>> * }*
> >>>>
> >>>> Here is the task function:
> >>>>
> >>>> void xx_start_transfer(void *arg)
> >>>> {
> >>>>
> >>>> int ret;
> >>>>
> >>>> while (1) {
> >>>> ret = rtdm_task_wait_period();
> >>>> __ipipe_serial_debug("*******return value = %d\n", ret);
> >>>> gpio_set_value(LED, 1);
> >>>> rtdm_task_sleep(0);
> >>>> }
> >>>> }
> >>>
> >>> I can not reproduce your problem, it works fine here. Could you post
> the
> >>> full code of a simplified driver which triggers the problem ?
> >>>
> >>>
> >>> --
> >>>                                                                 Gilles.
> >>>
> >>
> >> Sure, please find it attached. It's just the standard atmel_spi.c with
> >> task_init command added in atmel_spi_probe() function.
> >>
> > Whatever happened to "simplified"? Please try to reduce your code to the
> > minimum code which triggers the bug. By doing so, you may even find the
> > problem yourself.
> >
> For instance, following your bug report, I wrote the following module:
>
> #include <rtdm/rtdm_driver.h>
>
> static rtdm_task_t t;
>
> void xx_start_transfer(void *arg)
> {
>         rtdm_task_wait_period();
>         rtdm_printk("!!!!!!!!!!!tick!\n");
> }
>
> int init(void)
> {
>         rtdm_task_init(&t, "spi_transfer", xx_start_transfer, NULL, 99,
> 100000000);
>         return 0;
> }
>
> module_init(init);
> MODULE_LICENSE("GPL");
>
> Which works here. As I said, you can confirm whether rtdm_task_init
> works for your configuration by launching latency -t 1 -p 100000
>
> --
>                                                                 Gilles.
>
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to