Re: elimination of intercharacter gap in RS232 stream?
- From: "Bo" <bo@xxxxxxxxxx>
- Date: Wed, 10 Oct 2007 13:25:54 -0500
"Tim Wescott" <tim@xxxxxxxxxxxxxxxx> wrote in message
news:A6idndX7n8gRm5DanZ2dnUVZ_gmdnZ2d@xxxxxxxxxxxxxxx
On Wed, 10 Oct 2007 11:50:19 -0500, Bo wrote:Indeed. I'd love to be doing this on an RTOS.
Writing an Embbeded Linux app for a PC104/Versalogic board. LinuxYou're probably running afoul of Linix's only-almost-real-time character.
2.6.14.17.
Using write() to transmit data packets to another PC104 board. If I
write()
30 bytes, sometimes there is a 2-5mS gap in the middle of the
transmission, usually at about byte 15-20, but sometimes at byte 29--as
seen
on a scope. Tried using low latency setting when
opening the port--but this made no difference. This is causing
difficulties
for the receiving end-- and we have yet to add two more serial ports to
the
application.
Any ideas on how to force continous transmission of the data?
If you have some compelling system reason to send the serial stream
unbroken then you'll probably need to get RTAI Linux or Xenomai going, and
write your own serial driver under that to get your unbroken packets.
If you _don't_ have a compelling system reason to do this, and you _do_
have access to the receiver code, fix it there per cbarn24050's
suggestion.
--
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com
We've tried several things to fix the rcvr end at app level(cbarns
suggestion) but aren't getting repeatable, reliable results. As often the
case, I don't have explicit specs that indicate whether this gap will be a
problem or not for other/all devices in the system--so even if we manage to
fix our rx end, I'd like to fix my tx end to be sure that other devices are
happy with me. To clarify a little-- we are developing 2 apps on 2 identical
boards-- one is simulator, the other a command module going into a
missile--both running Linux. The command module talks with many devices over
serial ports.
Wish I knew the answer's to Ted's questions--but I don't--yet. This would be
simple to do with no RTOS even on an 8051 talking to a 16550---but the Linux
factor, and the fact I'm in Linux learning curve, is the problem for me. If
I could directly/easily control the UART I know I could fix the problem. I
don't know whether the kernel calls/system are causing the gap, or a setup
issue in the UART. I was hoping for a magic API function that would _flush_
the uart buffers, not throw away the data.
Thanks for all the quick replies and suggestions Tim, Cbarn, Ted, Donald,
et. al.
Best regards,
Bo
.
- Follow-Ups:
- Re: elimination of intercharacter gap in RS232 stream?
- From: Jim Granville
- Re: elimination of intercharacter gap in RS232 stream?
- From: Rich Webb
- Re: elimination of intercharacter gap in RS232 stream?
- From: msg
- Re: elimination of intercharacter gap in RS232 stream?
- From: Paul E. Bennett
- Re: elimination of intercharacter gap in RS232 stream?
- References:
- elimination of intercharacter gap in RS232 stream?
- From: Bo
- Re: elimination of intercharacter gap in RS232 stream?
- From: Tim Wescott
- elimination of intercharacter gap in RS232 stream?
- Prev by Date: Re: elimination of intercharacter gap in RS232 stream?
- Next by Date: www.yedil.com best hindi entertainment site
- Previous by thread: Re: elimination of intercharacter gap in RS232 stream?
- Next by thread: Re: elimination of intercharacter gap in RS232 stream?
- Index(es):
Relevant Pages
|