Welcome to the world of real time programming!
You are generating interrupts much faster than the Linux kernel can handle.
Your choices are to either find some "real" time extension to the Linux
kernel, or get a driver (and probably kernel patch) that can minimize the
IRQ overhead of each byte.
If you can, start with the baud rate slow and make sure data is recived
correctly, to rule out progamattic bugs first.
step by step, increase the baud rate until it fails. It has been my
experience that an ISA card with a fairly responsive OS maxes out around
20K IRQ per second. Your 460K baud is about double that.
At your speed, you have a total IRQ response time of about 2us. I do not
know what the kernel overhead is, but 2us is not a lot of time. Plus, 2us
is a bit optimistic as well because your programs presumably need to so
something with this data.
You should target the IRQ handler (Including kernel overhead) to take no
more than .5us.
If your card is a ISA, you would be better off with an PCI
> I'm trying to use a RS422 serial card based on the 16750 UART (made by
> Brainboxes?), I'm trying to use it at 460Kbaud. I'm getting data but
> occasionally I get repeated characters (I also get lost characters). The
> application in question cannot tolerate loss or repetition and I can't
> use flow control. I've tryed kernels 2.0.29, 2.1.30 ( which recognised
> it as a 16750) and 2.1.99 which took the card to be a 16550A, but still
> got losses and repetition. The repetition was of the form a char being
> repeated from 16 bytes before (originally) and from 64 bytes before with
> kernel 2.1.30.
> Has anybody used a card at this speed, this UART at this speed, give me
> any pointers.
> Will a 200MHz Pentium be able to cope with this speed (no of interrupts)
> with/without 64 byte FIFO???
> Any help much appreciated.
> Please mail me direct (too) as I am a stranger to this group.
> Dr. Nick Yeadon, Room A48 | Tel: +44 1737 836605
> BBC Research & Development | Fax: +44 1737 836665
> Surrey, KT20 6NP, UK | Web: http://www.bbc.co.uk/rd