Re: Events on Serial port
- From: Derek <derek.philip@xxxxxxx>
- Date: Mon, 7 Jul 2008 13:33:52 -0700 (PDT)
On 4 Jul, 12:01, Rolf Schroedter <m...@xxxxxxxxxxx> wrote:
Derek wrote, On 04.07.2008 11:07:So far an otherwise idle Linux box seems fine, there isn't a lot of
What do you mean by full speed, at the set baud rate?
I presume the latency in the actual write from the background is OS
dependant!, this may not be the issue but would have an impact on what
I'm doing.
By "full speed" I mean that in worst case bytes are transmitted as fast
as the baud rate allows, one character after the other using the
UART-FIFO (if no handshake).
And you don't have any control, because specially Windows is far from
being a real-time OS with predictable timing.
Your OS may even decide not to send/receive characters even for seconds,
if it thinks, that there is something more important to do.
If there are real timing restrictions on the receiver side, then you
need handshake. Adding artificial delays after sending each character
may help (I'm doing this), but there is no guaranty, neither for Linux
nor for Windows.
data to move around, just 27 bytes.
I need to get the data in and process it pretty quick but otherwise
I'm idle mostly.
I have quite strict timing, i need to detect and process RDS data
within 22mS worse case.
This is fine under Linux, Tcl is quite fast at doing the processing,
getting the data into the script is the slow part!
Generally that should be possible, but this depends on your baud rate
and your serial driver settings.
Looking on the scope a buad rate of just 115200 seems to be fine, I'm
keeping to this as I can't predict the performance
of the inbuilt uarts. I assume that a modern PC will do 115200.
E.g. in the device manager/com port/Port settings/advanced there is aI've looked at the buffers when I found I wasn't getting anything back
slider for interrupt levels for your FIFO which radically changes your
serial I/O latency. I prefer the Low(1) settings meaning that an
interrupt is generated after reception of the first incoming character
without any delay. The Higher(14) settings are useful for very fast
serial transmissions (Modem Internet) to avoid overloading the OS with
serial interrupts.
and shrunk them both down to minimum.
I'll check out the interrupt settings.
I'm not totally clear, where is your problem.
Do you suspect that sent characters are not received ?
Or do you have more trouble to detect and process incoming bytes ?
What is your baud rate and your complete [fconfigure] settings ?
Under Linux there was no problem per-se but I was wondering if there
was a better way of doing what I'm doing.
Some event driven method rather than polling.
Since starting this thread I found that Windows does not want to play
ball.
I know that the script side of things can handle detecting and
processing the data.
I know that the H/W can deliver the data at the rate required, it all
works under Linux
However it seems under windows I'm missing some aspect of the chain of
command, I do have to do more testing
to determine if there is any thing "on the wire" that could be giving
windows cause for concern.
I suspect my use of the flow control lines to indicate data available
may be causing the windows a problem.
Cant remember the fconfigure off the top of my head, I'll post it
later.
Regards,
Rolf.
Thanks
Derek
.
- Follow-Ups:
- Re: Events on Serial port
- From: Rolf Schroedter
- Re: Events on Serial port
- References:
- Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Rolf Schroedter
- Re: Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Ralf Fassel
- Re: Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Rolf Schroedter
- Re: Events on Serial port
- From: Derek
- Re: Events on Serial port
- From: Rolf Schroedter
- Events on Serial port
- Prev by Date: Re: AppleScript launching of Wish Shell doesn't work...
- Next by Date: Re: Events on Serial port
- Previous by thread: Re: Events on Serial port
- Next by thread: Re: Events on Serial port
- Index(es):
Relevant Pages
|