Re: Linux serial port dropping bytes
- From: David Brown <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 02 Apr 2008 12:53:33 +0200
CBFalconer wrote:
<snip>
I left the whole thing unsnipped. The time has come for me to
crave forgiveness. I think I have been afflicted with age or
something. The bits/persec crowd are absolutely correct, and I am
wrong.
I don't think you need forgiveness - you just made a mistake.
So that leaves the real problem handling throughput of
approximately 1 char each 10 microsec.
You need to handle an *average* of 1 character per 10 us. But the cost of handling each character is peanuts - even if the UART is on a slow bus, you should be able to read out characters at something like 20 per us. The cost is in the handling of the interrupt itself - context switches, cache misses, etc. That's why you use a UART with a buffer - it takes virtually the same time to read 128 bytes out the buffer during one interrupt, as to read 1 byte from the buffer during the interrupt. So if you've set your UART to give an interrupt every 100 characters, you get an interrupt every ms and read out a block of 100 characters at a time.
.
- Follow-Ups:
- Re: Linux serial port dropping bytes
- From: CBFalconer
- Re: Linux serial port dropping bytes
- References:
- Linux serial port dropping bytes
- From: Derek Young
- Re: Linux serial port dropping bytes
- From: CBFalconer
- Re: Linux serial port dropping bytes
- From: Grant Edwards
- Re: Linux serial port dropping bytes
- From: CBFalconer
- Re: Linux serial port dropping bytes
- From: Grant Edwards
- Re: Linux serial port dropping bytes
- From: CBFalconer
- Linux serial port dropping bytes
- Prev by Date: Re: Linux serial port dropping bytes
- Next by Date: Re: 18F452 RC oscillator mode
- Previous by thread: Re: Linux serial port dropping bytes
- Next by thread: Re: Linux serial port dropping bytes
- Index(es):
Relevant Pages
|