Thread (4 messages) 4 messages, 3 authors, 2017-06-13

Aw: RT and tty communication

From: <hidden>
Date: 2017-06-12 17:39:06

Gesendet: Montag, 12. Juni 2017 um 15:48 Uhr
Von: "Niels Kolthoff" [off-list ref]
An: linux-rt-users@vger.kernel.org
Betreff: RT and tty communication
Hi,

I'm currently testing a RT application that communicates with sensor
hardware using a tty serial port. The application polls the tty port
(non-blocking) in a user space thread (priority 80) for incoming data.
On a raspberry PI3 (ttyAMA0), with kernel 4.4.9-rt17, response times <
650usec are achieved, which is fine.

Any version equal or above 4.4.12-rt20 will increase response peaks to
(about 0.1%) > 2msec, with some peaks > 5msec.
When you use interrupt driven input, you have to wait for the interrupt and that depends on parameters like at how many bytes in the FIFO an interrupt is triggered.
But you can use polling instead of waiting for IRQ, e. g. check every 40 microseconds for new bytes.
And you should use hardware with low latency, e. g. an PCIe card and NOT an USB-RS-232/422/485 adapter.

Regards,

Rolf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help