[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [realtime] Re: [rtl] 8254 counter 2 ??
Stuart Hughes wrote:
>
> You have 2 separate problems:
>
> 1/ RTL: the later versions of RTL use channel 2 of the 8254 internally,
> so it can't be used for the sound example on a 486.
>
> 2/ RTAI: Depending on what PC you have, the TICK_PERIOD may be too fast
> and cause the machine to hang, to solve this I set the DIVISOR to 1. I
> can get this to work on a 486DX-33 if I set the following in
> sound/rt_process.c (this should solve your RTAI problem).
>
> //#define ONESHOT
>
> #define TIMER_TO_CPU 3 // < 0 || > 1 to maintain a symmetric processed
> timer.
>
> //#define DIVISOR 10
> #define DIVISOR 1
>
> #define TICK_PERIOD ((125000 + DIVISOR/2)/DIVISOR)
>
> NOTE: I always use periodic mode on 486's as otherwise anything that you
> do on the machine that could cause a 'beep' on the speaker (e.g
> backspace at the command prompt) will cause the machine to hang, this is
> a known and documented limitation.
>
> Regards, Stuart.
Thank to Stuart for the above, I should have answered it myself but it
is likely I missed the related mail.
I suggest avoiding the use of the oneshot timer on 486. It is too
sluggish since it has to relay entirely on the 8254, with too many ISA
bus IOs. Nonetheless if anybody badly needs it we can try to fix the
problem, it is framed already.
One more warning about RTAI. When using the examples always have a look
at the ticking defined in the examples as that can kill your machine if
it is too fast for it.
For example, if I had to do some tests to verify under a loaded machines
it could happen that the sound test can be distributed to interrupt at
100 Khz using just 1 in 12 (the DIVISOR above was for 80 Khz) task
schedules to output to the speaker. An easy and valid check as our hear
is a qualitatively good controller.
Moreover some examples are set for dual CPUs, and those just trapping
the timer require you to ascertain that the 8254 timer is always used on
UPs. So always have a look at the READMEs because you have so many
choices.
Ciao, Paolo.
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/