Page 1 of 1

COM port errors -which are fatal?

Posted: Wed Jul 12, 2006 1:49 pm
by earlz
I'm attempting to implement COM ports and well now I'm at t handling errors but which errors are fatal and which do I need to do something for and such
also does the break interrupt error there was an error with the line(like if they unplugged it?)

and will errors keep happening? like if theres an overrun error but I don't read the port will the error call the interrupt again right after iret

Re:COM port errors -which are fatal?

Posted: Thu Jul 13, 2006 12:20 am
by blip
From what I know the break condition is generated by the transmitter on the other side. If it's another UART they'd set bit 6 of the Line Control Register. You detect it by bit 4 of the Line Status Register.

Overrun errors may not be fatal to a higher level protocol that may be able to simply request a retransmission of a packet. Framing errors may signal that the UART isn't set to the correct parameters like baud rate, parity, etc.

I don't know if not handling the conditions would keep generating interrupts but you shouldn't do that. You should either mask all conditions that would generate IRQs on the device in the Interrupt Enable Register when it's not being used, or have a receive buffer in use for the program using the UART.

HelpPC UART article (not only about 8250s despite the filename)
OSRC Communication Devices section