Question: I would like to know to know why UART errors occur, and when one should check for such errors. There is a post on here that asks about handling individual errors, such as overrun, parity, etc... I am clear on why data overrun happens, why parity error happens, but I would like to know what is the root cause. My question is more focused on why these errors could occur (physical reasons), and when one should do make error checking a factor for their application.

So far my program seems to work great (with no error checking), but I know that noise can mess things up. How could I simulate conditions that could cause the UART Rx/Tx ports to fail?

Answer: 
There are several potential sources for [noise](http://en.wikipedia.org/wiki/Noise_%28electronics%29) in any circuit. Some of the most common include:

* Poorly regulated power supplies;
* Switching power supplies;
* Insufficient [capacitive decoupling](http://en.wikipedia.org/wiki/Decoupling_capacitor) of the power rails near the MCU;
* [Inductive coupling](http://en.wikipedia.org/wiki/Inductive_coupling) of nearby electromagnetic sources (including 50 or 60Hz from the mains power; even if the circuit is battery powered, it will experience this interference when close enough to a mains source);
* RF sources near the resonant frequency of a trace on the circuit board, or one of its harmonics;
* Routing of high-current traces on the circuit board near signal lines;
* Etc.

In addition (as @jippie mentioned), clock skew is a very common cause of errors in any type of serial communication that uses a predetermined data rate. If you're using an external crystal and interfacing to another system that can reasonably be expected to be accurate, it's less likely to cause problems. Internal oscillators, however, can have tolerances that are several orders of magnitude worse than crystals, and tend to vary more over temperature ranges. 

There are several basic tests that can be performed on a running system to determine the basic noise (and skew) immunity of your interface, including:

* Freezing (cool the circuit to the minimum rating of its components);
* Baking (heat to the maximum rating);
* Exposure to [EMI](http://en.wikipedia.org/wiki/Electromagnetic_interference):
	+ Set the board on top of the power cord of a running space heater;
	+ Key a CB radio in the near vicinity of the board;
	+ Put the board next to your wireless router;
	+ Use long hookup wire (instead of a properly constructed serial cable) for the UART connection.

There are many others--in fact, there are large testing labs dedicated to [EMC](http://en.wikipedia.org/wiki/Electromagnetic_compatibility) qualification.

In general, unless some minimal level of data loss is acceptable, it is always prudent to include some sort of error checking in your communications code. Even a simple checksum is better than nothing.
Framing errors can be caused by what @jippie mentions - the receiver has detected the start bit and where it expects the stop bit the data is inverted. This can also be due to data corruption caused by line interference impinging on the stop bit. You always need to check this for each byte received.

Parity errors occur when parity is implemented on the data link and there is a corruption that causes a parity mismatch in the received data. You always need to check this for each byte received.

Receive break is also regarded as an error although it's really an indication that the incoming data has fallen to logical zero for longer than 1 byte of data. Normally logical 1 is the "ambient" state between successive data bytes and it remains this way. It's a throw back to old telegraphy systems I think. I wouldn't bother checking this unless you were using this "feature" to indicate (say) a reset command to the receiver.

Overrun error is when a new byte is received before the previous byte was read by a CPU. Slightly different when a FIFO is involved but amounts to the same thing - valid received data is lost due to CPU slowness. Always check this before reading a byte and if the byte is part of a longer message (or command) throw the whole message/command away and somehow request the transmitter to resend the whole message/command.

Under run is not really an error but indicates to the sending UART that it's transmit buffer is empty i.e. it is requesting a new byte to transmit. You don't need to check this.