powerpc mvme5500 clock off by factor of 150
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Mon Mar 7 18:18:39 UTC 2005
Kate Feng wrote:
> Peter Dufault wrote :
>
>
>>Kate Feng wrote:
>
>
>>>Anyway, I have a look at the code :
>>> status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second()
>
> );
>
>
>>>Thus the time it takes is subject to the value of task_index.
>
> > >That is how he can get the factor of 5 seconds, right ?
>
>
>>If its off by 150, not by 5. But where is the time base and decrementer
>
> enabled?
>
>> The code to do that is in mpc6xx/mmu/mmuAsm.S in the call to
>>"L1_caches_enables", but the call to that is commented out in
>
> mvme5500/startup/bspstart.c.
>
>
>> I tried just setting the bit in bspstart.c at that point but it didn't
>
> help.
>
> Please note that the bug I mentioned is not mvme5500 BSP related.
> I meant there is a bug in tests/samples/ticker/tasks.c. It was written:
>
> if ( time.second >= 35 ) {
> puts( "*** END OF CLOCK TICK TEST ***" );
> exit( 0 );
> }
> put_name( Task_name[ task_index ], FALSE );
> print_time( " - rtems_clock_get - ", &time, "\n" );
> status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second()
> );
>
>
> I took out the task_id so that it will wake up after 5 seconds
> for all three tasks. Now it works just as you expected - 5 seconds.
I don't understand what you think is broken in this test?
Does this BSP create any hidden/BSP specific tasks? That can
mess this test up.
> task_index = 34
> Tes - rtems_clock_get - 09:00:00 12/31/1988
> task_index = 35
> task_index = 36
> t_ta - rtems_clock_get - 09:00:00 12/31/1988
> skd - rtems_clock_get - 09:00:00 12/31/1988
> Tes - rtems_clock_get - 09:00:05 12/31/1988
> t_ta - rtems_clock_get - 09:00:05 12/31/1988
> skd - rtems_clock_get - 09:00:05 12/31/1988
> Tes - rtems_clock_get - 09:00:10 12/31/1988
> t_ta - rtems_clock_get - 09:00:10 12/31/1988
> skd - rtems_clock_get - 09:00:10 12/31/1988
> Tes - rtems_clock_get - 09:00:15 12/31/1988
> t_ta - rtems_clock_get - 09:00:15 12/31/1988
> skd - rtems_clock_get - 09:00:15 12/31/1988
> Tes - rtems_clock_get - 09:00:20 12/31/1988
> t_ta - rtems_clock_get - 09:00:20 12/31/1988
> skd - rtems_clock_get - 09:00:20 12/31/1988
> Tes - rtems_clock_get - 09:00:25 12/31/1988
> t_ta - rtems_clock_get - 09:00:25 12/31/1988
> skd - rtems_clock_get - 09:00:25 12/31/1988
> Tes - rtems_clock_get - 09:00:30 12/31/1988
> t_ta - rtems_clock_get - 09:00:30 12/31/1988
> skd - rtems_clock_get - 09:00:30 12/31/1988
> Tes - rtems_clock_get - 09:00:35 12/31/1988
> t_ta - rtems_clock_get - 09:00:35 12/31/1988
> skd - rtems_clock_get - 09:00:35 12/31/1988
>
>
> P.S. My E-mailer does not work very well for now,
> at least for the incoming mail.
>
> Kate
>
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list