Re: [uCsimm] SPI

From: 권석근 (kwonsk@mutech.co.kr)
Date: Sat May 13 2000 - 01:40:40 EDT


Hi, Kang Tin LAI

Sombody (forgot his name) reported me about the same problem like you.
(repeated jiffies lost message at startup)
The reason for this is timer overrun. I've tested my RT porting with RAM
based kernel. And RAM based kernel is faster than FLASH based.
(see wait control settings in ucsimm-head.S) Therefore i could not catch
such a problem like you.

Why Timer overrun occured ?
1. Current RT porting use free run timer
2. Get current timer (TMR)
3. Calculate next timer setting
4. Set next timer value (TCMP)
in step 2,3,4 caluation must be doen before next timer value.
if current time is 100 and calulated next time is 200 and
timer caluation consumes 110 then setting TCMP as 200 cuase a problem

This could be solved if you adjust wait time of FLASH access.
or try to change shorten calulation time like this
long long diff --> long diff (rt_time.c near line 65)
or try to grow diff adjustment value like 150 or so.
if (diff < 100) --> if (diff < 150) (rt_time.c near line 130).
or try to use previous RT version, it's not too bad :-)

Well, i 'll try to test RT-uClinux with FLASH based kernel.
Thanks
kwonsk

>Hi,
>
>Sorry, when I started my fresh RT kernel, it told me "jeffies lost",
>"jeffies lost", "jeffies lost", "jeffies lost", "jeffies lost",...
>
>I still work on putting RT to simm, so I haven't any idea of this. May
>be
>Kwosk? (Sorry that I am not sure his name) (Kwosk ports RT to simm) who
>has a new idea for improving the RT interrupt latency.
>
>If you require to maintain constant between 2 16-bit xfer, extra
>hardware is un-avoidable.
>
>ktlai@hk.net
>
>"Reynolds, Alfred" wrote:
>>
>> How much skew is there in RTLinux periodic timers? Can they be within
62.5us
>> of the expected time? I know interrupts on RTLinux on the uCSimm take
about
>> 130us to be serviced, so using the interrupt method for filling the
buffer
>> won't work.
>> To do the CBR stream, I am going to try the easy way with the SPI and
trying
>> to service it quick enough. If it doesn't work then I will build some
>> supporting circuitry :)
>>
>> Alfred
>> This message resent by the ucsimm@uclinux.com list server
http://www.uClinux.com/
>This message resent by the ucsimm@uclinux.com list server
http://www.uClinux.com/
>

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:36 EST