powerpc mvme5500 clock off by factor of 150

Kate Feng feng1 at bnl.gov
Tue Mar 8 15:24:52 UTC 2005


"Joel Sherrill " wrote:

> 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.
>

I do not think so.  I  ran the test from cexp on mvme5500.  Later today,
I will run it under mvme2307 to see the difference.  Also, I will run it
without cexp to see how it works.


I would recommend Peter to test  tasks.obj  on his board with
rtems5500-cexp.bin I built to see if it works. Peter,
can you send me the source code you used for testing  or
at least tell me what value you got for task_index of all
the three tasks ? Is it 1 ?


cexp> ld("tasks.obj")
cexp> do_task()



Sorry, Peter.  There were problems with my E-mail (both incoming
and outgoing) at my work and perhaps RTEMS mailing list ?
My E-mailer does not allow to send code larger than 100K.
Also I had difficulty to send out the ticker object code and
binary of cexp I used to test on the mvme5500 to RTEMS
mailing list. I will keep trying to send you the code offline.

Regards,
Kate








More information about the users mailing list