[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
issue with DTR on devboard_lx
I'm resending this - I tried last week and the message didn't appear to show
up - list server problems? Sorry for the duplicate if it did.
I came across some unexpected behavior trying to use the DTR line with COM1
on the deboard_lx. ( kernel 2.4.19, serial.c rev 1.40).
When I first configured the port (ser0), I chose the option
"DTR_RI_DSR_CD_on_PB" and assigned DTR to PB4 (as per schematics). I left the
remaining control lines (RI,CD,DSR) as -1 to indicate that they shouldn't be
used. When I ran my application, I came across the unusual behavior that the
RS-232 driver chip was shutting off whenever the tty cleared the CD line (my
application doesn't use the CD, but apparently the tty does).
I tracked down in the serial.c file that the default pin mask for CD aligned
with the chip enable pin on port B for the RS-232 driver (bit 3).
I also noticed that there are two sets of setup code for the serial control
lines - one for all the control lines on the same port, one for having them on
mixed ports. It turns out that if you chose to have them all on the same port,
but you didn't assign pins to the lines you don't want to use, they will get
used anyway at some default pin numbers with the "dummy" masks. In this mode,
all the control lines use the same variable to hold the control port, so
instead of using the "dummy" port, CD, RI, and DSR all use the real port where
The work-around is to select "DTR_RI_DSR_CD_mixed_on_PA_and_PB" even if
they're not. The setup code for this option uses separate variables for the
control port for each line, and correctly assigns the so-called dummy port to
unused control lines.
I apologize if this was already posted or well-known, but I didn't find any
references in the archive or docs.