[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
485 serial port read delay and send/receive turnaround
1) I'm working on an application that requires the etrax100 to quickly poll
up to 16 devices on a 485 bus. It sends 3 byte pings and each board
responds with a 3 byte reply if there's nothing new to report and up to 160
bytes or so if there's new data.
The problem is that the 3 byte ping/pongs need to occur at about 2ms per
board. With the default kernel, the delay (reading?) was on the order of
150ms. Enabling "fast serial port dma flush" on the kernel got this down
to around 20ms. Turning the fast dma flush back off and reducing the
"receive flush timeout" to zero got the delay down to 10ms.
During one test, we "primed" the fifo by sending 60 bytes of pings without
a read and then doing a ping/ out of sync read; the
delay was 2ms. It seems the problem is that the fifo doesn't immediately
report new data. The fast dma flush didn't really work because the fifo
hadn't even triggered the dma in the first place.
Can those fifo's be disabled?
2) Also, when turn a send/receive turnaround, there's always a junk
character as the first character received, apparently due to a glitch on
the 485 bus output when then transmitter is turned off. It used to be
random till I enabled "disable serial receive"; now the junk character is
HID Corporation - Engineering
11674 N. Huron Street
Denver, CO 80234-2924