4,199
edits
Changes
no edit summary
=== Lag ===
You can see that RS232 have some lag between transmisions. This caused mainly by kernel process management. UART peripheral is controlled by Linux and It isn't a real time operation system.
{| width="200" cellspacing="1" cellpadding="1" border="1" align="center"
Click to enlarge image
This program have three I/O functions that connect to UART driver via ioctl (read(), write() and select()), but only select() and write() and put program in sleep mode, the proceess awake when I/O task is completed. Select functions is used to prevent that readswas blocked when there aren't data avaliable.The next captures are do it with GPIO debug mode and 300 bauds speed. Blue=UART1, Violet=write function time and Green=select function time.<br>