Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, i learned the ipipe trace that i send you but i don't unserstand why i have three timer reprogramming in few useconds. Can you explain me the behaviour ? Il 08/04/2012 00:17, Gilles Chanteperdrix ha scritto: On 04/06/2012 06:59 PM, Roberto Bielli wrote: Hi Gilles, i made all

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 10:18 AM, Roberto Bielli wrote: Hi Gilles, i learned the ipipe trace that i send you but i don't unserstand why i have three timer reprogramming in few useconds. Can you explain me the behaviour ? Can you resend the trace and give us the time where this happens? Anyway, the

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, I don't find the end of last __ipipe_grab_irq in the trace that i send you. Is it correct ? Il 08/04/2012 00:17, Gilles Chanteperdrix ha scritto: On 04/06/2012 06:59 PM, Roberto Bielli wrote: Hi Gilles, i made all your modifies and re-read all corect register but the problem is

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 10:43 AM, Roberto Bielli wrote: Hi Gilles, I don't find the end of last __ipipe_grab_irq in the trace that i send you. Is it correct ? Yes, because the timer interrupt reschedules and wakes up the periodic task. I had a look at the timer programming events, it is true that the

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, i look at the processor errata but for the imx25 there are no errata elements on timer. I see that tsc uses the same timer. Does xenomai use the tsc for the next timer period ? Il 10/04/2012 10:45, Gilles Chanteperdrix ha scritto: On 04/10/2012 10:43 AM, Roberto Bielli wrote:

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 10:58 AM, Roberto Bielli wrote: Hi Gilles, i look at the processor errata but for the imx25 there are no errata elements on timer. I see that tsc uses the same timer. Does xenomai use the tsc for the next timer period ? If you look at the trace, you will see that with the

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 10:58 AM, Roberto Bielli wrote: Hi Gilles, i look at the processor errata but for the imx25 there are no errata elements on timer. It is strange that you use linux 2.6.31 on imx25: linux 2.6.31 does not support imx25. The I-pipe support has not been written for imx25, so, it

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 11:06 AM, Gilles Chanteperdrix wrote: On 04/10/2012 10:58 AM, Roberto Bielli wrote: Hi Gilles, i look at the processor errata but for the imx25 there are no errata elements on timer. It is strange that you use linux 2.6.31 on imx25: linux 2.6.31 does not support imx25.

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, the steps for supporting imx25 have been: 1. We buy a board with imx25 2. Our supplier made the porting of linux 2.6.31 freescale with imx25 3. we put a xenomai 2.5.6 and we have adapted for imx25. The only changes is this (because imx25 registers are identical to mx3 ): old:

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, here is my time.c Il 10/04/2012 11:11, Gilles Chanteperdrix ha scritto: On 04/10/2012 11:06 AM, Gilles Chanteperdrix wrote: On 04/10/2012 10:58 AM, Roberto Bielli wrote: Hi Gilles, i look at the processor errata but for the imx25 there are no errata elements on timer. It is

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 11:19 AM, Roberto Bielli wrote: Hi Gilles, the steps for supporting imx25 have been: 1. We buy a board with imx25 2. Our supplier made the porting of linux 2.6.31 freescale with imx25 3. we put a xenomai 2.5.6 and we have adapted for imx25. The only changes is this

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 11:21 AM, Roberto Bielli wrote: Hi Gilles, here is my time.c Looks fine, though I do not understand why you do not use timer_is_v2 instead of cpu_is_mx3 || cpu_is_mx25. I think the problem is elsewhere, and I suggest you check whether linux without xenomai has or has not the

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 11:21 AM, Roberto Bielli wrote: Hi Gilles, here is my time.c Though you have not made all the changes I suggested. Here is the time.c I would use. -- Gilles. /* * linux/arch/arm/plat-mxc/time.c * * Copyright

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, i tried your code but th behavior is the same. Then i tried a linux base app and works correctly. Il 10/04/2012 11:37, Gilles Chanteperdrix ha scritto: On 04/10/2012 11:21 AM, Roberto Bielli wrote: Hi Gilles, here is my time.c Though you have not made all the changes I

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 12:39 PM, Roberto Bielli wrote: Hi Gilles, i tried your code but th behavior is the same. Then i tried a linux base app and works correctly. The tsc physical address passed to user-space looks wrong. void __ipipe_mach_get_tscinfo(struct __ipipe_tscinfo *info) {

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 12:39 PM, Roberto Bielli wrote: Hi Gilles, i tried your code but th behavior is the same. Then i tried a linux base app and works correctly. In the exact same conditions? With the crunching task running with SCHED_FIFO, priority 1, and the periodic task running with

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Hi Gilles, i added this in configure of xenomai so i pass --enable-arm-mach=imx25 imx25)arch=5 tsc_type=__XN_TSC_TYPE_FREERUNNING;; Furthermore in plat-mxc/include/mach/mxc.h explain which are cpumx2 and imx25 is NOT mx2 #define cpu_is_mx2()(cpu_is_mx21() ||

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
Il 10/04/2012 14:06, Gilles Chanteperdrix ha scritto: On 04/10/2012 02:05 PM, Roberto Bielli wrote: Hi Gilles, i added this in configure of xenomai so i pass --enable-arm-mach=imx25 imx25)arch=5 tsc_type=__XN_TSC_TYPE_FREERUNNING;; Furthermore in

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
here is some logs. status=on:setup=616:clock=509343446344:timerdev=mxc_timer1:clockdev=mxc_timer1 root@AXC25:/data# cat /proc/xenomai/timer status=on:setup=616:clock=509413956366:timerdev=mxc_timer1:clockdev=mxc_timer1 root@AXC25:/data# cat /proc/xenomai/timer

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 02:33 PM, Roberto Bielli wrote: Il 10/04/2012 13:49, Gilles Chanteperdrix ha scritto: On 04/10/2012 12:39 PM, Roberto Bielli wrote: Hi Gilles, i tried your code but th behavior is the same. Then i tried a linux base app and works correctly. In the exact same conditions? With

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Roberto Bielli
In the xenomai example the task periodic is 2ms not 200us. ( rt_task_sleep( 2ms 000us 000ns ) ); And the 10ms is because the default system time period of the timer without xenomai is ~10ms. So a process that execute in linux base can be re-scheduled only when the timer generate an interrupt ,

Re: [Xenomai-core] preemptive doesn't work

2012-04-10 Thread Gilles Chanteperdrix
On 04/10/2012 02:58 PM, Roberto Bielli wrote: In the xenomai example the task periodic is 2ms not 200us. ( rt_task_sleep( 2ms 000us 000ns ) ); sorry, I misred. And the 10ms is because the default system time period of the timer without xenomai is ~10ms. So a process that execute in linux