Re: fast communication problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Nov 2005, Ivan Korzakow wrote:

> Hi List,
>
> I'm running a 2.6.14 linux on 96 MHz MIPS processor. I need to cope
> with a device that sends a byte of data every 50 microsecond through
> an UART with no FIFO. What would be the best (well, the least
> horrible) way to handle that ? The good point is that I know when the
> communication starts.
>
> Any idea, any help, any "good luck" will be much appreciated !
>
> Thanks in advance,
>
> Ivan

Linux can handle interrupts at 100 microsecond intervals with
an ix86 of 400 MHz or above. The MIPS is supposed to be superb for
this kind of operation so you may not have a problem at 50 us and
90 MHz.

The hardware engineers here do know something so they would
never design something that needed the CPU at 50 microsecond
intervals --yet, although there are some new kids coming out
of school that haven't a clue and might create a requirement
like yours in the future!

The interrupt code must be well thought out, with the minimum
overhead of getting a byte from your buffer and writing it to
the device.

Use fixed buffers, probably ping/pong, so you don't have to
allocate anything in the ISR. If it doesn't work, then
call the hardware engineers the idiots they are after
instrumenting the reason why it won't work (takes 80
microseconds just to get to the ISR, leaving negative
time to do the work). They do everything in FPGAs nowadays.
If they buffered just one byte, you get interrupted every
100 us, 4 bytes 200 us, etc. Every bit helps.

Cheers,
Dick Johnson
Penguin : Linux version 2.6.13.4 on an i686 machine (5589.51 BogoMips).
Warning : 98.36% of all statistics are fiction.
.

****************************************************************
The information transmitted in this message is confidential and may be privileged.  Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited.  If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.

Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux