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)
        info->type = IPIPE_TSC_TYPE_FREERUNNING;
        if (cpu_is_mx1()) {
                info->u.fr.counter = (unsigned *) (TIM1_BASE_ADDR + MX1_2_TCN);
        } else if (cpu_is_mx2()) {
                info->u.fr.counter = (unsigned *) (GPT1_BASE_ADDR + MX1_2_TCN);
        } else if (cpu_is_mx3() || cpu_is_mx25() ) {
#if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX25
                info->u.fr.counter = (unsigned *) (GPT1_BASE_ADDR + MX3_TCN);
        info->u.fr.mask = 0xffffffff;
        info->u.fr.tsc = &tsc->full;

Here cpu_is_mx2() will return true, and we will not go to cpu_is_mx25().

Are you using the tsc in user-space?

If you are passing --enable-arm-mach=mx2 to xenomai configure 
script, you are using the tsc in user-space, and it is a wonder 
how it works.


Xenomai-core mailing list

Reply via email to