Summary
A framing error on the TL16C754B locks up QNX 4.25, doing a tight loop of reading the IIR and IER, but never reading the LSR to clear the framing error.
I wonder if QNX 4.25 Dev.ser has a “verbose” command that would allow us to see what it is autodetecting the UART as?
Is there any history or knowledge available showing a problem with the TL16C754B quad UART and QNX 4.25’s Dev.ser?
Problem Description
We have encountered a problem with an embedded system that runs QNX 4.25. It has a Texas Instruments TL16C754B quad UART connected to an STPC Elite. The system works fine in all cases, except for one: when the baud rate is high, say 57600, and you send a character at a low baud rate, say 9600, QNX locks up until watchdog reboot.
The 9600 baud character causes a framing error on the UART. Upon receipt of this particular interrupt, QNX locks into a tight loop of about 8-20 uSec per loop. It looks like QNX can’t handle the framing error interrupt that such an event would cause, at least on this particular quad UART, the T.I. TL16C754B.
Autodetect UART?
There is an elaborate detection scheme used by all O/S when trying to figure out what UART it has on-hand, so it can both use the advanced features of the part (like FIFO) and avoid bugs (some UARTs have broken LCRs, etc). Perhaps QNX is detecting this one incorrectly?
I captured the entire detection sequence on the analyzer, but I can’t make sense of it.
Datasheet
When I refer to table and page numbers, I’ll be referring to the datasheet for the quad UART, which T.I. calls SLLS397A.
“Good” Character Received
Step…UART…Address…Data Read…Data Write…Comment
00…IRQ goes active after character received
01…3…2…C1…IIR read of UART 3 (shares IRQ), no interrupt
02…1…2…CC…IIR read, sees binary XX001100, see table 4 page 11, RX timeout
03…1…0…0D…The that I sent from the terminal, IRQ released after this
04…1…1…60…IER read, don’t know why
05…3…2…C1…IIR read of UART 3, no interrupt
06…1…2…C1…IIR read of UART 1, no interrupt
“Bad” Character Received, QNX Locks Up
Step…UART…Address…Data Read…Data Write…Comment
00…IRQ goes active during character receive (framing error)
01…3…2…C1…IIR read of UART 3 (shares IRQ), no interrupt
02…1…2…C6…IIR read, sees binary XX000110, LCR interrupt
03…1…1…E1…IER read, don’t know why
04…3…2…C1…IIR read of UART 3 (shares IRQ), no interrupt
05…1…2…C6…IIR read, sees binary XX000110, LCR interrupt
06…1…1…E1…IER read, don’t know why
07…3…2…C1…IIR read of UART 3 (shares IRQ), no interrupt
08…1…2…C6…IIR read, sees binary XX000110, LCR interrupt
09…1…1…E1…IER read, don’t know why
10…3…2…C1…IIR read of UART 3 (shares IRQ), no interrupt
11…1…2…C6…IIR read, sees binary XX000110, LCR interrupt
12…1…1…E1…IER read, don’t know why
…