COM port errors -which are fatal?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
earlz

COM port errors -which are fatal?

Post 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
blip

Re:COM port errors -which are fatal?

Post 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
Post Reply