Re: elimination of intercharacter gap in RS232 stream?




"Tim Wescott" <tim@xxxxxxxxxxxxxxxx> wrote in message
news:A6idndX7n8gRm5DanZ2dnUVZ_gmdnZ2d@xxxxxxxxxxxxxxx
On Wed, 10 Oct 2007 11:50:19 -0500, Bo wrote:

Writing an Embbeded Linux app for a PC104/Versalogic board. Linux
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?

You're probably running afoul of Linix's only-almost-real-time character.
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

Indeed. I'd love to be doing this on an RTOS.

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


.



Relevant Pages

  • Re: elimination of intercharacter gap in RS232 stream?
    ... Using writeto transmit data packets to another PC104 board. ... Any ideas on how to force continous transmission of the data? ... We've tried several things to fix the rcvr end at app levelbut aren't getting repeatable, ... 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. ...
    (comp.arch.embedded)
  • classic aacraid SCSI Hang and Dell Perc 3/Di
    ... There have been numerous firmware updates that claim they fix the problem. ... Has anyone at Dell actually worked with someone at Red ... delivering the transmission to the intended recipient, ...
    (RedHat)
  • Re: Is this them or is this my set?
    ... Is this something with my TV or with their transmission? ... it is an oversight on the part of Sharp. ... They obviously do that when changing channels so the most of ... that will fix the problem. ...
    (alt.tv.tech.hdtv)
  • Re: xp service pack 2 a dud
    ... > variety of hardware setups! ... If you're reading about problems *in the newsgroup*, ... as someone once said, "hang around a transmission ... And except for very rare situations, they always get a fix ...
    (microsoft.public.windowsxp.general)
  • Re: Warning Naked People earning $10,000 in 6 days!
    ... like the handsome guy in the video. ... I used to work with a gal with a nice gap ... A proper bra will fix that... ...
    (alt.marketing.online.ebay)