[ECOS] Serial communications

Nick Garnett nickg@ecoscentric.com
Thu Jul 9 09:07:00 GMT 2009


grahamlab <graham.labdon@cranems.co.uk> writes:

> Would someone please tell me how often the Serial_ISR and Serial_DSR
> functions get called
> Thanks

Essentially once per character, there are no FIFOs so the ISR has to
get each byte out of the receive register before the next arrives. If
the ISR is sufficiently delayed it might be able to fetch two
characters from the device if it happens to run at exactly the right
time. The DSR will be scheduled every time a character is put into the
rx buffer. The DSRs might also be delayed, so when it runs it might
find several interrupts have happened and there are several characters
in the rx buffer. It will then deal with all of those before
returning. The purpose of the rx buffer is to decouple the DSR from
the actual hardware, so only ISR latency actually matters.

However, unless you are seeing any of the status error bits I
mentioned being set, or the rx buffer is overflowing, I don't think
that the problem lies in the latency of the ISR or DSR. I believe you
also tried reducing your baud rate to 1200, where the ISR has a
luxurious 8ms to respond, and it still failed. So I cannot see that
the problem is in either the serial device or the driver. 

You mentioned that you were using Linux in VirtualBox with USB serial
convertors. When you tried running with real serial devices, was this
also using VirtualBox? If so I know where I am tempted to point the
finger. Are you able to run Linux on a real machine, or use a Windows
based terminal emulator for your testing?

-- 
Nick Garnett                                       eCos Kernel Architect
eCosCentric Limited    http://www.eCosCentric.com       The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales:                         Reg No: 4422071


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list