public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Cliff Brake <cliff.brake@gmail.com>
To: rt-users <linux-rt-users@vger.kernel.org>
Subject: rt application question with rs232 communication
Date: Mon, 9 Mar 2009 17:34:49 -0400	[thread overview]
Message-ID: <f96d234e0903091434xafaedcamc68023ebce5c7799@mail.gmail.com> (raw)

Hello,

I have an application where I do the following:

- PXA270 CPU
- communicating over serial ports on 40ms intervals
- communication scheme is very simple in that the linux system sends a
packet every 40ms and expects a response back within the 40ms window
- currently using 2.6.27 with CONFIG_PREEMPT

If I set the application comm thread to real time priority, the
sending works very well.  There is very little jitter in the 40ms send
timing.  However, it seems that the system has trouble receiving the
response in a timely fashion.  I often observe that it takes at least
10ms for the application to receive the response data after the data
has appeared on the rs232 bus.  Is the RT patch something that would
help speed up the serial receive response time, or is there something
else going on that I am missing?  The system is fairly busy with
graphical processing, but the sending is always right on schedule.

It seems that interrupts may be involved with this problem as when
sending, the send data is smaller than the FIFO size, and is probably
put into the fifo during the write, where with the read, an interrupt
needs to fire, etc.  Does all the kernel code that handles the serial
data automatically run at the calling application's RT priority, or is
there additional work required to make everything that touches the
data RT?

I'm also trying to figure out how well RT will work for CAN
communications.  Once again we have the same problem -- a RT user
space application needs to send and receive data with strict timing.
Which, I can make a RT thread in user space run well (toggle a gpio
with very little jitter), how does this translate to all the kernel
components involved in the socketcan stack (networking, etc) that need
to touch the data?

Thanks,
Cliff

-- 
=======================
Cliff Brake
http://bec-systems.com

             reply	other threads:[~2009-03-09 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 21:34 Cliff Brake [this message]
2009-03-10 12:44 ` rt application question with rs232 communication Cliff Brake
2009-03-15  2:07   ` Leon Woestenberg
2009-03-16 20:05     ` Cliff Brake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f96d234e0903091434xafaedcamc68023ebce5c7799@mail.gmail.com \
    --to=cliff.brake@gmail.com \
    --cc=linux-rt-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox