{"id":10300,"date":"2026-12-01T18:47:48","date_gmt":"2026-12-01T10:47:48","guid":{"rendered":"https:\/\/www.flywing-tech.com\/blog\/?p=10300"},"modified":"2026-12-01T18:47:50","modified_gmt":"2026-12-01T10:47:50","slug":"uart-troubleshooting","status":"publish","type":"post","link":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/","title":{"rendered":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors"},"content":{"rendered":"<div class=\"fsc_text\">\n<p><strong>UART troubleshooting: fast diagnosis summary<\/strong><\/p>\n\n\n\n<p>Garbage characters, framing errors, and missing UART data often result from baud rate mismatches, incorrect UART settings, logic-level incompatibility, or electrical noise. Measure the TX bit period, verify UART configuration on both devices, check signal voltage levels, and review firmware error flags to identify the cause.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #cbd5e1\">\n\n        <thead style=\"background:linear-gradient(135deg,#0f172a,#0284c7);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;width:23%\">Symptom<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:25%\">Most Likely Cause<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:27%\">First Diagnostic Step<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:25%\">Fix<\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody style=\"color:#1e293b\">\n\n            <tr style=\"background:#f0f9ff;border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">Garbage characters \/ gibberish RX<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Baud rate mismatch<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Measure TX bit period on oscilloscope<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Match baud rates; use crystal clock source<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">Framing error flag set on every byte<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Stop bit not detected (baud\/parity mismatch)<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Compare baud rate, data bits, parity, stop bits both ends<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Align UART config: 8N1 \/ 8E1 \/ 9600 etc.<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f0f9ff;border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">All bytes received as 0x00 or 0xFF<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Logic level mismatch or inverted signal<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Probe RX pin with oscilloscope, check idle HIGH<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Add level shifter or fix voltage domain<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">Intermittent errors \u2014 worsens at temperature<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Internal oscillator (HSI\/RC) drift<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Replace with crystal-clocked UART, monitor error rate vs temp<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Switch to external crystal or TCXO clock source<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f0f9ff;border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">Overrun error (ORE) flag in firmware<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">RX buffer overflow \u2014 bytes not read fast enough<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Check ISR latency, DMA config, FIFO depth<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Use DMA RX, increase buffer, reduce baud rate<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">RX works at 9600, fails at 115200+<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">BRR rounding error at high baud; signal integrity<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Verify BRR divisor gives &lt;2% error; probe eye diagram<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Use crystal, reduce cable length, reduce baud<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f0f9ff;border-bottom:1px solid #bae6fd\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">First byte lost on every transmission<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Missing or inadequate RX enable time \/ FIFO flush<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Check hardware flow control timing, check FIFO flush sequence<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Assert RTS\/DE before first byte; flush FIFO on init<\/td>\n            <\/tr>\n\n            <tr>\n                <td style=\"padding:12px 16px;font-weight:700;color:#b91c1c;border-right:1px solid #bae6fd\">TX sends nothing<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">TX pin not connected; GPIO not assigned to UART AF<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #bae6fd\">Probe TX pin, verify AF mapping in firmware<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Remap GPIO alternate function; check PCB net<\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\r\n<div class=\"ez-toc-title-container\">\r\n<h2 class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/h2>\r\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #023a85;color:#023a85\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #023a85;color:#023a85\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\r\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#uart_frame_structure_what_must_agree_between_tx_and_rx\" >UART Frame Structure: What Must Agree Between TX and RX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#baud_rate_accuracy_clock_sources_tolerance_and_brr_calculation\" >Baud Rate Accuracy: Clock Sources, Tolerance, and BRR Calculation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#uart_error_types_flags_causes_and_firmware_handling\" >UART Error Types: Flags, Causes, and Firmware Handling<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#logic_level_compatibility_and_level_shifting\" >Logic Level Compatibility and Level Shifting<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#oscilloscope_measurement_technique_for_uart_diagnostics\" >Oscilloscope Measurement Technique for UART Diagnostics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#hardware_flow_control_rtscts_and_its_role_in_error_prevention\" >Hardware Flow Control: RTS\/CTS and Its Role in Error Prevention<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#signal_integrity_cables_termination_and_emi\" >Signal Integrity: Cables, Termination, and EMI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#firmware_diagnostic_techniques\" >Firmware Diagnostic Techniques<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#frequently_asked_questions\" >Frequently Asked Questions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\r\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"uart_frame_structure_what_must_agree_between_tx_and_rx\"><\/span><strong>UART Frame Structure: What Must Agree Between TX and RX<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Universal_asynchronous_receiver-transmitter?utm\">UART<\/a> (Universal Asynchronous Receiver-Transmitter) is a full-duplex serial protocol with no shared clock line. Synchronization is achieved entirely through agreed-upon timing: both ends must independently generate the same bit period (the reciprocal of the baud rate) from their own clock sources. A single byte is transmitted as a frame consisting of a start bit, data bits, an optional parity bit, and one or two stop bits. The receiver waits for the falling edge of the start bit, then samples the subsequent bits at intervals of one bit period, beginning 1.5 bit periods after the start-bit edge (to sample near the centre of each bit).<\/p>\n\n\n\n<p>Every parameter of the frame must be identical on the transmitter and receiver. A mismatch in any single parameter will corrupt received data, generate error flags, or produce no reception at all. The parameters are: <strong>baud rate<\/strong> (bits per second), <strong>data bits<\/strong> (5, 6, 7, or 8 \u2014 almost universally 8 in modern systems), <strong>parity<\/strong> (None, Even, or Odd), and <strong>stop bits<\/strong> (1 or 2). The shorthand 8N1 means 8 data bits, No parity, 1 stop bit and is by far the most common configuration in embedded systems. Any deviation from this default must be explicitly configured identically on both ends.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"720\" src=\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/UART-Frame-Structure-and-Timing-Diagram.png\" alt=\"UART frame structure and timing diagram showing the start bit, 8 data bits transmitted LSB first, and stop bit.\" class=\"wp-image-10301\" \/><\/figure>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #dbeafe\">\n\n        <thead style=\"background:linear-gradient(135deg,#1e3a8a,#2563eb);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;font-size:15px;align-items:center;gap:8px\">\n                    <span>\u26a1<\/span> Quick fact \u2014 UART idle line is logic-HIGH\n                <\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody>\n\n            <tr style=\"background:#eff6ff\">\n                <td style=\"padding:18px 20px;line-height:1.7;color:#334155\">\n                    An idle <strong>UART TX or RX<\/strong> line sits at <strong>logic-HIGH (VCC level)<\/strong>. The start bit is the first <strong>LOW<\/strong>, which the receiver detects as the beginning of a frame. If the line is stuck LOW (logic-0 at idle), the receiver will continuously try to decode a start bit and will produce a constant stream of <strong>framing errors<\/strong>. This is the first thing to check when RX produces garbage immediately after power-up: probe the TX output of the transmitting device at idle and confirm it is at <strong>VCC<\/strong>.\n                <\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"baud_rate_accuracy_clock_sources_tolerance_and_brr_calculation\"><\/span><strong>Baud Rate Accuracy: Clock Sources, Tolerance, and BRR Calculation<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Because UART has no shared clock, the accuracy of data reception depends entirely on the accuracy of the baud rate generators at both ends. If the transmitter sends bits at 115200 baud and the receiver is running at 112000 baud (a 2.9% deficit), the sampling point drifts progressively through the frame. By the eighth data bit, the receiver is sampling approximately 24% of one bit period too late, placing the sample point dangerously close to the transition to the stop bit. At worst, the last bit is misread or the stop bit sample falls into the previous data bit&#8217;s time slot, causing a framing error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>The Baud Rate Tolerance Derivation<\/strong><\/h3>\n\n\n\n<p>The tolerable mismatch E (expressed as a percentage of nominal baud rate) can be derived from first principles. The receiver samples the last data bit at 8.5 bit periods from the start-bit falling edge (for 8N1). Each bit period, the receiver&#8217;s clock contributes an error of E% of one bit period. By the final bit, cumulative drift is 8.5 \u00d7 E% of one bit period. For the sample to remain within the valid mid-bit window, this drift must not exceed approximately 30% of one bit period (the remaining margin after accounting for start-bit sampling imprecision):<\/p>\n\n\n\n<p><strong>8.5 \u00d7 E \/ 100 &lt; 0.30 &nbsp; \u21d2 &nbsp; E &lt; 3.5%&nbsp; per device<\/strong><\/p>\n\n\n\n<p>However, both the transmitter and receiver clocks have independent errors that add in the worst case. If both have errors of equal magnitude but opposite sign, the total effective mismatch is 2E%. The combined limit becomes approximately 2% total mismatch \u2014 1% per device. This is the basis for the commonly cited rule that UART requires baud rate accuracy better than 2% combined between the two endpoints. With parity enabled (8E1 or 8O1), one additional bit is sampled, tightening the tolerance further to approximately 1.5% per device.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Clock Source Selection and Its Impact<\/strong><\/h3>\n\n\n\n<p>The achievable baud rate accuracy is determined by the clock source driving the UART peripheral. The table below summarises the accuracy of common clock sources used in microcontrollers.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #e0e7ff\">\n\n        <thead style=\"background:linear-gradient(135deg,#312e81,#4f46e5);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;width:23%\">Clock Source<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:15%\">Accuracy (25\u00b0C)<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:16%\">Accuracy (over temp)<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:19%\">Suitable for UART?<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:27%\">Notes<\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody style=\"color:#1e293b\">\n\n            <tr style=\"background:#eef2ff;border-bottom:1px solid #e0e7ff\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#312e81;border-right:1px solid #e0e7ff\">External crystal (HSE)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b120\u201350 ppm<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b150\u2013100 ppm<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;border-right:1px solid #e0e7ff\">Yes \u2014 preferred<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Best accuracy; mandatory for USB-combined designs<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #e0e7ff\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#312e81;border-right:1px solid #e0e7ff\">TCXO (temperature-compensated)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b10.5\u20132 ppm<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b12\u20135 ppm<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;border-right:1px solid #e0e7ff\">Yes \u2014 excellent<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Required for precision timing or narrow-band RF<\/td>\n            <\/tr>\n\n            <tr style=\"background:#eef2ff;border-bottom:1px solid #e0e7ff\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#312e81;border-right:1px solid #e0e7ff\">Internal RC (HSI) \u2014 STM32 calibrated<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b11%<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b12\u20133% over temp<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b45309;border-right:1px solid #e0e7ff\">Marginal \u2014 risky above 115200<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Trim at 25\u00b0C only; degrades with temperature<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #e0e7ff\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#312e81;border-right:1px solid #e0e7ff\">Internal RC (ESP32)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">Varies \u00b15% uncalibrated<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b110% worst case<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b91c1c;border-right:1px solid #e0e7ff\">No \u2014 unreliable alone<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Use external XTAL for UART; auto-baud helps<\/td>\n            <\/tr>\n\n            <tr style=\"background:#eef2ff;border-bottom:1px solid #e0e7ff\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#312e81;border-right:1px solid #e0e7ff\">RP2040 ROSC<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b150% untrimmed<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">Unusable<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b91c1c;border-right:1px solid #e0e7ff\">No<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">12 MHz XOSC required; ROSC for non-timing tasks only<\/td>\n            <\/tr>\n\n            <tr>\n                <td style=\"padding:12px 16px;font-weight:700;color:#312e81;border-right:1px solid #e0e7ff\">LPUART + LSE (32.768 kHz crystal)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b120 ppm<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #e0e7ff\">\u00b150 ppm<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;border-right:1px solid #e0e7ff\">Yes \u2014 for low baud rates<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">256x oversampling; ideal for 9600 baud in sleep modes<\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #fde68a\">\n\n        <thead style=\"background:linear-gradient(135deg,#92400e,#d97706);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;font-size:15px;align-items:center;gap:8px\">\n                    <span>\u26a0\ufe0f<\/span> Common failure scenario \u2014 changing the system clock without recalculating BRR\n                <\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody>\n\n            <tr style=\"background:#fffbeb\">\n                <td style=\"padding:18px 20px;line-height:1.7;color:#334155\">\n                    On <strong>STM32<\/strong> and similar microcontrollers, the UART baud rate register (<strong>BRR<\/strong> or <strong>USARTDIV<\/strong>) is computed as: <strong>BRR = f<sub>PCLK<\/sub> \/ (oversampling_ratio \u00d7 baud_rate)<\/strong>. If the peripheral clock (<strong>f<sub>PCLK<\/sub><\/strong>) changes \u2014 because the PLL configuration was updated, or the APB prescaler was changed, or the HSI\/HSE source was switched \u2014 the BRR value is now wrong. The UART hardware will not report any error; it will simply run at the wrong baud rate. The <strong>HAL_UART_Init()<\/strong> function returns <strong>HAL_OK<\/strong> even when the requested baud rate cannot be achieved exactly. Always call <strong>HAL_UART_Init()<\/strong> after any clock tree modification. When debugging baud rate issues after a firmware update, the first question to ask is: did the system clock configuration change?\n                <\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>BRR Rounding Error at High Baud Rates<\/strong><\/h3>\n\n\n\n<p>The baud rate register holds an integer (or integer plus fraction, depending on the peripheral). The actual baud rate is f_PCLK \/ (N \u00d7 BRR_value), where N is the oversampling ratio (16 or 8). If the division is not exact, the BRR must be rounded, introducing a fixed error. This error is proportionally larger at higher baud rates because the BRR value is smaller and the rounding error is a larger fraction of it.&nbsp;<\/p>\n\n\n\n<p>For example, on a 42 MHz APB1 clock at 115200 baud with 16x oversampling: BRR = 42,000,000 \/ (16 \u00d7 115200) = 22.786, rounded to 23, giving an actual baud rate of 42,000,000 \/ (16 \u00d7 23) = 114,130 baud \u2014 an error of 0.93%, which is acceptable. At 921600 baud with the same clock: BRR = 42,000,000 \/ (16 \u00d7 921600) = 2.848, rounded to 3, giving 42,000,000 \/ 48 = 875,000 baud \u2014 an error of 5.1%, which exceeds the 3.5% single-device limit and will cause framing errors with another device at exactly 921600 baud.<\/p>\n\n\n\n<p>The diagnostic: if a design works reliably at 9600 baud but not at 115200 or higher, BRR rounding error is a primary suspect alongside signal integrity. Calculate the exact BRR value and the resulting actual baud rate from the datasheet formula before assuming a hardware fault.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"uart_error_types_flags_causes_and_firmware_handling\"><\/span><strong>UART Error Types: Flags, Causes, and Firmware Handling<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Modern UART peripherals maintain status flags that identify four distinct error conditions. Each flag corresponds to a different failure mechanism and requires a different diagnostic and software response. Critically, most UART peripherals hold received data in the receive data register (RDR) even when an error flag is set. The firmware must read the status register before reading RDR to know whether the received byte is reliable.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #d1fae5\">\n\n        <thead style=\"background:linear-gradient(135deg,#064e3b,#047857);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;width:17%\">Error Type<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:15%\">UART Flag (typical)<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:23%\">Cause<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:21%\">Effect on RX data<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:24%\">Firmware Detection<\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody style=\"color:#1e293b\">\n\n            <tr style=\"background:#ecfdf5;border-bottom:1px solid #d1fae5\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#065f46;border-right:1px solid #d1fae5\">Framing Error (FE)<\/td>\n                <td style=\"padding:12px 16px;font-family:monospace;font-size:13px;font-weight:600;color:#b91c1c;border-right:1px solid #d1fae5\">FE \/ FER \/ FERR<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Stop bit sampled as logic-0 (baud mismatch, noise, break signal)<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Byte discarded; garbage byte may appear in FIFO<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Read status register before RDR; clear FE before re-enabling RX<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #d1fae5\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#065f46;border-right:1px solid #d1fae5\">Overrun Error (ORE)<\/td>\n                <td style=\"padding:12px 16px;font-family:monospace;font-size:13px;font-weight:600;color:#b91c1c;border-right:1px solid #d1fae5\">ORE \/ OERR<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">New byte arrived before firmware\/DMA read previous byte from RDR<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Previous byte overwritten and lost; ORE set<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Use DMA circular buffer or large FIFO; check ISR latency<\/td>\n            <\/tr>\n\n            <tr style=\"background:#ecfdf5;border-bottom:1px solid #d1fae5\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#065f46;border-right:1px solid #d1fae5\">Parity Error (PE)<\/td>\n                <td style=\"padding:12px 16px;font-family:monospace;font-size:13px;font-weight:600;color:#b45309;border-right:1px solid #d1fae5\">PE \/ PERR<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Received parity bit does not match computed parity of data bits<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Byte placed in FIFO but PE flag set; value may be corrupt<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Check PE after each byte; retransmit on detected PE<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #d1fae5\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#065f46;border-right:1px solid #d1fae5\">Noise Error (NE)<\/td>\n                <td style=\"padding:12px 16px;font-family:monospace;font-size:13px;font-weight:600;color:#b45309;border-right:1px solid #d1fae5\">NE \/ NERR<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Majority vote samples disagree during 16x oversampling<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">Byte may be incorrect; NE flag set alongside FE or PE<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Monitor NE rate; indicates signal integrity problem<\/td>\n            <\/tr>\n\n            <tr style=\"background:#ecfdf5\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#065f46;border-right:1px solid #d1fae5\">Break Condition<\/td>\n                <td style=\"padding:12px 16px;font-family:monospace;font-size:13px;font-weight:600;color:#1d4ed8;border-right:1px solid #d1fae5\">LBD \/ BRK<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">RX line held LOW for &gt; one full frame duration<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #d1fae5\">All-zeros byte received; FE also set<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Distinguish break from framing error by duration; used in LIN protocol<\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Framing Error (FE): The Most Common Error Flag<\/strong><\/h3>\n\n\n\n<p>A framing error occurs when the UART receiver detects a logic-LOW signal instead of the expected logic-HIGH stop bit. The received byte may be incorrect or unreliable. After detecting the error, the receiver resets its bit counter and waits for the next start bit.<\/p>\n\n\n\n<p>The most common causes are <strong>baud rate mismatch<\/strong>, incorrect data\/parity\/stop-bit settings, and electrical noise. For example, if the transmitter uses 8N1 but the receiver uses 7E1, the receiver checks for the stop bit at the wrong position. Repeated framing errors usually indicate a configuration mismatch, while intermittent errors may point to signal integrity problems.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #fecdd3\">\n\n        <thead style=\"background:linear-gradient(135deg,#991b1b,#dc2626);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;font-size:15px;align-items:center;gap:8px\">\n                    <span>\ud83d\udea8<\/span> Critical \u2014 do not read RDR without checking FE first\n                <\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody>\n\n            <tr style=\"background:#fff1f2\">\n                <td style=\"padding:18px 20px;line-height:1.7;color:#334155\">\n                    On <strong>STM32 UART<\/strong> peripherals (and many others), reading the status register (<strong>ISR\/SR<\/strong>) followed by reading the receive data register (<strong>RDR\/DR<\/strong>) atomically clears the <strong>FE flag<\/strong>. If your firmware reads <strong>RDR<\/strong> without first checking the FE flag, it will silently discard the error information. The correct sequence in an interrupt handler is: <strong>(1)<\/strong> read <strong>SR\/ISR<\/strong> to get all error flags, <strong>(2)<\/strong> check each flag individually, <strong>(3)<\/strong> read <strong>RDR\/DR<\/strong> to clear <strong>RXNE<\/strong> and get the data byte, <strong>(4)<\/strong> handle the error (log, discard, retransmit). On <strong>STM32 HAL<\/strong>, the <strong>HAL_UART_ErrorCallback()<\/strong> fires only if error interrupt enable bits (<strong>FEIE, OREIE<\/strong>) are set in the <strong>CR3<\/strong> register.\n                <\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Overrun Error (ORE): A Firmware Timing Problem<\/strong><\/h3>\n\n\n\n<p>An overrun error occurs when the UART shift register completes assembly of a new byte while the previous byte has not been read from RDR by firmware. The new byte cannot be transferred to RDR, so it is discarded and the ORE flag is set. The previous byte in RDR is preserved. ORE is not an electrical or configuration problem; it is a software throughput problem. It indicates that the gap between consecutive received bytes (determined by the baud rate) is shorter than the time firmware takes to service the UART receive event and read RDR.<\/p>\n\n\n\n<p>At 115200 baud with 8N1 framing, one byte occupies 86.8 \u03bcs. If the interrupt service routine takes longer than 86.8 \u03bcs from the time RXNE fires to the time RDR is read, and two bytes arrive back-to-back, an overrun is guaranteed. DMA-based reception (where the DMA controller reads RDR autonomously into a ring buffer without CPU involvement) eliminates ORE at any baud rate that the DMA bus can sustain. When DMA is not available, the interrupt latency and ISR execution time must be verified to be shorter than the inter-byte gap.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Noise Error (NE): Signal Integrity Indicator<\/strong><\/h3>\n\n\n\n<p>A noise error is flagged when the 16x oversampling majority vote samples disagree during a bit period. The receiver takes three samples near the centre of each bit (at positions 7, 8, and 9 of the 16 sample clock cycles per bit). If the three samples are not all the same logic level (e.g., HIGH, LOW, HIGH), the receiver flags a noise error and uses the majority value. The final byte may or may not be correct. When NE is set alongside FE, it indicates that noise affected the stop bit specifically. NE on its own (without FE or PE) suggests that noise is present but not severe enough to cause synchronisation loss. A rising NE flag rate is a leading indicator of a deteriorating connection, long cable without proper termination, or nearby EMI source.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"logic_level_compatibility_and_level_shifting\"><\/span><strong>Logic Level Compatibility and Level Shifting<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>UART logic levels are defined by the I\/O voltage of the driving device, not by the UART protocol itself. TTL-level UART (5 V) and LVTTL-level UART (3.3 V) are electrically incompatible with each other and both are incompatible with RS-232 (\u00b13 V to \u00b115 V swing with inverted logic). Connecting devices across voltage domains without level shifting is a common cause of unreliable UART communication and permanent hardware damage.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #cbd5e1\">\n\n        <thead style=\"background:linear-gradient(135deg,#0f172a,#1d4ed8);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;width:24%\">Scenario<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:15%\">TX voltage<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:19%\">RX VIH min<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:16%\">Safe?<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:26%\">Solution<\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody style=\"color:#1e293b\">\n\n            <tr style=\"background:#f8fafc;border-bottom:1px solid #e2e8f0\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#1e3a8a;border-right:1px solid #cbd5e1\">3.3 V MCU \u2192 3.3 V MCU<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">3.3 V high<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">2.0 V (LVTTL)<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;border-right:1px solid #cbd5e1\">Yes<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Direct connection; verify VIH spec of target<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #e2e8f0\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#1e3a8a;border-right:1px solid #cbd5e1\">5 V MCU \u2192 3.3 V MCU (3.3 V not 5V-tolerant)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">5 V high<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">2.0 V but max 3.6 V on RX pin<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b91c1c;border-right:1px solid #cbd5e1\">No \u2014 pin damage risk<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Voltage divider (2:1 ratio) or bidirectional level shifter<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f8fafc;border-bottom:1px solid #e2e8f0\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#1e3a8a;border-right:1px solid #cbd5e1\">5 V MCU \u2192 3.3 V MCU (5V-tolerant RX pin)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">5 V high<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">2.0 V; pin tolerates 5 V<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;border-right:1px solid #cbd5e1\">Yes \u2014 check datasheet<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Direct connection permissible; verify 5V-tolerance in datasheet<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #e2e8f0\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#1e3a8a;border-right:1px solid #cbd5e1\">3.3 V MCU \u2192 5 V MCU<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">3.3 V high<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">2.4 V (TTL) or 3.5 V (CMOS)<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b45309;border-right:1px solid #cbd5e1\">Marginal for TTL; fail for CMOS<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">Level shifter or pull-up to 5 V on RX line<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f8fafc;border-bottom:1px solid #e2e8f0\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#1e3a8a;border-right:1px solid #cbd5e1\">UART to RS-232 (PC COM port)<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">\u00b13.3 V or \u00b15 V swing<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">\u22123 V to +3 V (RS-232 inverted logic)<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b91c1c;border-right:1px solid #cbd5e1\">No \u2014 direct connection destroys MCU<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">MAX232 or SP3232 level converter mandatory<\/td>\n            <\/tr>\n\n            <tr>\n                <td style=\"padding:12px 16px;font-weight:700;color:#1e3a8a;border-right:1px solid #cbd5e1\">MCU 1.8 V I\/O \u2192 3.3 V system<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">1.8 V high<\/td>\n                <td style=\"padding:12px 16px;border-right:1px solid #cbd5e1\">2.0 V threshold typically<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b91c1c;border-right:1px solid #cbd5e1\">No \u2014 logic-0 may not register<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5\">1.8 V\u20133.3 V bidirectional translator (TXS0101, BSS138 FET)<\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>The 5V-to-3.3V Problem in Detail<\/strong><\/h3>\n\n\n\n<p>The most common logic level incompatibility encountered in embedded design is a 5 V AVR, Arduino Uno, or legacy MCU transmitting to a 3.3 V STM32, ESP32, nRF52, or Raspberry Pi module. The 5 V TX output swings to 5 V. The 3.3 V RX pin on the target device has an absolute maximum rating of 3.6 V or 4 V. Applying 5 V to this pin forward-biases the internal ESD protection diode (anode at RX pin, cathode at VCC 3.3 V rail), injecting approximately (5 V \u2212 3.3 V \u2212 0.7 V) \/ R_ESD of current into the 3.3 V supply. With a low R_ESD (a few hundred ohms), this can be several milliamperes, raising the VCC rail, resetting the MCU, or permanently damaging the input protection structure over time.<\/p>\n\n\n\n<p>The fix options in increasing robustness: (1) a resistor voltage divider from 5 V TX to 3.3 V RX (e.g., 1 k\u03a9 from 5V-TX to junction, 2 k\u03a9 from junction to GND \u2014 output: 5V \u00d7 2\/(1+2) = 3.33 V), limited to low baud rates because the capacitance loads the divider; (2) a single N-channel MOSFET open-drain level shifter (BSS138 or similar), which translates 5 V logic to 3.3 V by pulling the 3.3 V rail LOW through the FET; or (3) a dedicated bidirectional level translator IC such as the Texas Instruments TXS0108E (auto-direction sensing) or TXB0108 (push-pull, faster for higher baud rates).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1280\" height=\"720\" src=\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/UART-Logic-Level-Shifting-Three-Approaches.png\" alt=\"**Alt Text:** UART logic level shifting comparison showing three methods: resistor voltage divider, BSS138 N-FET bidirectional level shifter, and TXS0108E integrated level shifter for 5V and 3.3V MCU communication.\" class=\"wp-image-10302\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>RS-232 to MCU UART: Mandatory Level Conversion<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/www.flywing-tech.com\/blog\/what-is-rs232\/?utm_source\">RS-232<\/a> is defined in TIA-232 as a single-ended, unbalanced interface with inverted logic polarity: a logic-1 (MARK state) is represented by a voltage of \u22123 V to \u221215 V, and a logic-0 (SPACE state) by +3 V to +15 V. This is the opposite of CMOS\/TTL logic where HIGH = logic-1. PC COM ports (DB9 connectors) output RS-232 levels. Connecting a PC RS-232 TX directly to a 3.3 V MCU RX pin applies up to +15 V to the RX pin, instantly destroying it. Connecting it to a 5 V MCU RX applies up to +15 V, with the same result.<\/p>\n\n\n\n<p>The mandatory solution is a RS-232 transceiver IC. The <a href=\"https:\/\/www.flywing-tech.com\/blog\/max232-ic-rs-232-to-ttl-converter-pinout-working\/?utm_source\">MAX232<\/a> (5 V supply) and SP3232 or MAX3232 (3.3 V supply) are standard choices. These ICs use internal charge pumps to generate \u00b18 V to \u00b110 V rails from a 3.3 V or 5 V input, translate RS-232 incoming signals to CMOS levels, and translate outgoing CMOS signals to RS-232 swing. For 3.3 V MCUs, the MAX3232 or the smaller MAX3221 (1 \u00d7 TX, 1 \u00d7 RX) are common and require only four 100 nF charge-pump capacitors.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #fde68a\">\n\n        <thead style=\"background:linear-gradient(135deg,#92400e,#d97706);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;font-size:15px;align-items:center;gap:8px\">\n                    <span>\u26a0\ufe0f<\/span> Warning \u2014 USB-to-serial adapter voltage matters\n                <\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody>\n\n            <tr style=\"background:#fffbeb\">\n                <td style=\"padding:18px 20px;line-height:1.7;color:#334155\">\n                    <strong>FTDI FT232RL<\/strong>, <strong>CP2102<\/strong>, <strong>CH340<\/strong>, and similar USB-to-serial bridge ICs output <strong>CMOS logic levels<\/strong>, not RS-232 levels. Their TX output is typically <strong>3.3 V or 5 V<\/strong> depending on the <strong>VIO<\/strong> supply pin. Many modules offer a solder jumper to select 3.3 V or 5 V I\/O. Verify the bridge output voltage before connecting to a <strong>3.3 V MCU<\/strong>: a 5 V bridge to a non-5V-tolerant 3.3 V MCU requires the same level shifting as any 5-to-3.3 V interface. The bridge also inverts the RS-232 polarity (it presents UART idle as <strong>HIGH<\/strong>, not the RS-232 convention), so it connects directly to MCU UART pins without any further inversion.\n                <\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flywing-tech.com\/product-detail\/analog-devices-inc-maxim-integrated-max3232eepe-2b92d607\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"2160\" height=\"270\" src=\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/12\/max3232eepe.png\" alt=\"Analog Devices \/ Maxim Integrated MAX3232EEPE+ RS-232 transceiver IC \u2013 dual driver and receiver 16-PDIP specifications and technical support at Flywing\" class=\"wp-image-10309\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"oscilloscope_measurement_technique_for_uart_diagnostics\"><\/span><strong>Oscilloscope Measurement Technique for UART Diagnostics<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>An oscilloscope is the definitive diagnostic instrument for UART signal problems. A logic analyzer decodes symbols but cannot reveal the electrical quality of the signal \u2014 it cannot show overshoot, ringing, slow edge rates, or marginal logic levels. For root-cause analysis of UART failures, start with an oscilloscope.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #ccfbf1\">\n\n        <thead style=\"background:linear-gradient(135deg,#0f766e,#0d9488);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;width:22%\">Measurement<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:27%\">What to Look For<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:24%\">Oscilloscope Setup<\/th>\n                <th style=\"padding:14px 16px;text-align:left;width:27%\">Pass \/ Fail Criterion<\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody style=\"color:#1e293b\">\n\n            <tr style=\"background:#f0fdfa;border-bottom:1px solid #ccfbf1\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#0f766e;border-right:1px solid #ccfbf1\">Idle line level<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">RX and TX should sit at logic-HIGH before any transmission<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">DC coupling, 1 V\/div, trigger on falling edge<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Idle = VCC (3.3 V or 5 V); idle LOW = inverted signal or missing pull-up<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #ccfbf1\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#0f766e;border-right:1px solid #ccfbf1\">Start bit width<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">First LOW pulse after idle is the start bit; measure pulse width<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Single-shot capture, 1\u00d7 bit period \/ div<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Width = 1 \/ baud rate \u00b12% (e.g. 8.68 \u03bcs at 115200)<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f0fdfa;border-bottom:1px solid #ccfbf1\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#0f766e;border-right:1px solid #ccfbf1\">Bit period uniformity<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">All bits should have equal width within frame<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Zoom to individual bits; measure each width<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">All bit periods within \u00b13% of nominal<\/td>\n            <\/tr>\n\n            <tr style=\"border-bottom:1px solid #ccfbf1\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#0f766e;border-right:1px solid #ccfbf1\">Stop bit integrity<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Must be logic-HIGH for \u22651 bit period<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Trigger on falling edge of stop bit (if any)<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#b91c1c;line-height:1.5\">Any LOW stop bit = framing error will be flagged<\/td>\n            <\/tr>\n\n            <tr style=\"background:#f0fdfa;border-bottom:1px solid #ccfbf1\">\n                <td style=\"padding:12px 16px;font-weight:700;color:#0f766e;border-right:1px solid #ccfbf1\">Eye diagram (high baud rates)<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Open, symmetric eye at sample point; no eye closure<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Persistence mode; overlay many frames<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Eye height &gt; 50% of logic swing; eye width &gt; 50% of bit period<\/td>\n            <\/tr>\n\n            <tr>\n                <td style=\"padding:12px 16px;font-weight:700;color:#0f766e;border-right:1px solid #ccfbf1\">Ringing \/ overshoot<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">Signal transitions should settle within 20\u201330% of bit period<\/td>\n                <td style=\"padding:12px 16px;line-height:1.5;border-right:1px solid #ccfbf1\">High bandwidth probe; zoom to rising\/falling edge<\/td>\n                <td style=\"padding:12px 16px;font-weight:600;color:#047857;line-height:1.5\">Overshoot &lt; \u00b120% of supply voltage; settling within 25% of bit period<\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Measuring Actual Baud Rate<\/strong><\/h3>\n\n\n\n<p>To verify the actual baud rate from the transmitter without knowing the data content: trigger on the falling edge of the TX line (start bit), then capture a full frame. Identify two consecutive bits that transition from HIGH to LOW or LOW to HIGH \u2014 bit boundaries. Measure the time between adjacent same-level bits (this is one bit period). The actual baud rate = 1 \/ (measured bit period). Compare against the nominal bit period for the intended baud rate.<\/p>\n\n\n\n<p>Alternatively, most oscilloscopes with serial decode capability can be set to auto-detect the baud rate from captured waveforms. Enter the protocol decoder, select UART, enable auto-baud detection, capture several bytes, and read the detected baud rate from the decode summary. This is faster than manual measurement but requires the signal to be clean enough for the auto-detect algorithm to converge.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Identifying Noise-Induced Errors<\/strong><\/h3>\n\n\n\n<p>If intermittent errors are suspected but no failure is visible in a short capture, use the oscilloscope&#8217;s persistence mode (also called infinite persistence or digital phosphor mode). Set persistence to maximum (or \u2018infinite\u2019) and trigger on UART TX with a normal trigger. After several hundred or thousand frames have overlapped, any outlier transitions will appear as a smear or a secondary trace at a different level. This reveals noise spikes, ground bounce, crosstalk from adjacent signals, or glitches caused by nearby power stage switching that are present on only a small fraction of frames.<\/p>\n\n\n\n<p>A differential probe across the GND pins of the two communicating devices will reveal ground potential differences. Any AC or DC offset greater than 0.4 V on the ground line is a source of logic-level uncertainty at the receiver and can cause intermittent framing errors under load.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"hardware_flow_control_rtscts_and_its_role_in_error_prevention\"><\/span><strong>Hardware Flow Control: RTS\/CTS and Its Role in Error Prevention<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>UART hardware flow control uses two additional signals \u2014 RTS (Ready to Send) and CTS (Clear to Send) \u2014 to allow the receiver to signal the transmitter to pause when it cannot accept more data. Without flow control, a receiver that cannot empty its FIFO or buffer fast enough will experience overrun errors (ORE) and lose data, even if the electrical connection is perfect and the baud rate is correctly matched.<\/p>\n\n\n\n<p>In the standard wired flow control configuration: the transmitter drives its RTS output LOW (asserted) to signal that it is ready to receive data. The receiver checks its CTS input before transmitting; it transmits only when CTS is asserted (LOW). When the receiver&#8217;s buffer fills, it deasserts RTS (drives HIGH), which the transmitter sees as CTS de-asserted, and the transmitter pauses until CTS is re-asserted. This handshake happens at the electrical level, below the firmware byte-handling layer, eliminating overrun errors that result from firmware latency.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #fde68a\">\n\n        <thead style=\"background:linear-gradient(135deg,#92400e,#d97706);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;font-size:15px;align-items:center;gap:8px\">\n                    <span>\u26a0\ufe0f<\/span> Common flow control wiring mistake \u2014 crossed vs straight RTS\/CTS\n                <\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody>\n\n            <tr style=\"background:#fffbeb\">\n                <td style=\"padding:18px 20px;line-height:1.7;color:#334155\">\n                    <strong>RTS<\/strong> of device A connects to <strong>CTS<\/strong> of device B, and <strong>RTS<\/strong> of device B connects to <strong>CTS<\/strong> of device A. This is the cross-connection required for two <strong>DTE<\/strong> devices (two MCUs, two PCs). It is <strong>NOT<\/strong> a straight-through connection. A <strong>null-modem<\/strong> cable makes this crossing internally. If flow control is enabled in firmware but RTS is wired to CTS of the same device (loopback), the device is always clear to send regardless of buffer state, and the flow control has no effect. If RTS and CTS pins are left unconnected while flow control is enabled in firmware, the transmitter will never see CTS asserted and will never transmit: a symptom that looks identical to a dead UART. Disable hardware flow control in firmware if the physical <strong>RTS\/CTS<\/strong> wires are absent.\n                <\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"signal_integrity_cables_termination_and_emi\"><\/span><strong>Signal Integrity: Cables, Termination, and EMI<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Cable Length and Capacitive Loading<\/strong><\/h3>\n\n\n\n<p>At low baud rates (9600 baud), UART signals can tolerate long cables (tens of metres) because the bit period (104.2 \u03bcs) is much longer than the cable RC time constant. At high baud rates (1 Mbaud, 4 Mbaud), the bit period (1 \u03bcs, 250 ns) approaches the cable&#8217;s RC time constant, causing signal edges to be rounded rather than sharp. The receiver samples near the centre of each bit, so as long as the signal reaches the correct logic level before the sample point, communication succeeds. When the cable RC delay is a significant fraction of the bit period, the signal no longer reaches the correct level before sampling, causing intermittent errors.<\/p>\n\n\n\n<p>The rule of thumb: cable capacitance of typical ribbon or twisted-pair cable is approximately 50\u2013100 pF\/m. Driven by a CMOS output with an internal impedance of approximately 10\u201350 \u03a9, a 1 m cable has an RC time constant of approximately 1\u20135 \u03bcs. At 115200 baud (8.68 \u03bcs per bit), this is acceptable. At 1 Mbaud (1 \u03bcs per bit), a 1 m cable is at the limit of viability. If long cable runs are required at high baud rates, consider RS-485 (differential signalling with 100 m capability at 1 Mbaud) instead of single-ended UART.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>RS-485 for Long-Distance UART Replacement<\/strong><\/h3>\n\n\n\n<p>RS-485 transmits UART-framed data over a differential pair (A and B lines). It determines logic levels through the voltage difference between the two wires rather than ground. A differential voltage above +200 mV represents logic-0, while a voltage below \u2212200 mV represents logic-1. This differential signalling reduces common-mode noise, supporting cable runs of up to 1,200 m at 100 kbaud or 100 m at 10 Mbaud.<\/p>\n\n\n\n<p>Termination is required for long RS-485 cables to prevent signal reflections. Twisted-pair cables typically have a characteristic impedance of 100\u2013120 \u03a9, so 120 \u03a9 termination resistors are placed across the A and B lines at both ends of the bus. Without proper termination, signal reflections can cause intermittent communication errors, especially over longer cables and at higher baud rates.<\/p>\n\n\n\n<div style=\"margin:40px auto;background:#ffffff;border-radius:12px;padding:20px;font-family:'Segoe UI',Roboto,Arial,sans-serif\" class=\"table-scrollable\">\n\n    <table style=\"width:100%;border-collapse:collapse;font-size:14px;min-width:900px;border:1px solid #dbeafe\">\n\n        <thead style=\"background:linear-gradient(135deg,#1e3a8a,#1d4ed8);color:#ffffff\">\n            <tr>\n                <th style=\"padding:14px 16px;text-align:left;font-size:15px;align-items:center;gap:8px\">\n                    <span>\ud83d\udca1<\/span> RS-485 fail-safe bias resistors for idle bus\n                <\/th>\n            <\/tr>\n        <\/thead>\n\n        <tbody>\n\n            <tr style=\"background:#eff6ff\">\n                <td style=\"padding:18px 20px;line-height:1.7;color:#334155\">\n                    When all <strong>RS-485 transmitters<\/strong> are idle (not driving the bus), the <strong>A<\/strong> and <strong>B<\/strong> lines float. If <strong>V(A) \u2212 V(B)<\/strong> is near zero volts, the receiver cannot determine whether the bus is idle or receiving a valid <strong>MARK (logic-1)<\/strong>. Some receivers interpret a floating bus as a <strong>logic-0 (SPACE)<\/strong> start bit, generating continuous framing errors. <strong>Fail-safe bias resistors<\/strong> resolve this: a pull-up resistor (<strong>560 \u03a9 to 1 k\u03a9<\/strong>) on the <strong>A line<\/strong> to <strong>VCC<\/strong> and a pull-down resistor to <strong>GND<\/strong> on the <strong>B line<\/strong> ensure the idle bus presents at least <strong>+200 mV<\/strong> differential, keeping receivers in the <strong>MARK (idle)<\/strong> state. These resistors are only needed at one point on the bus, typically at the master node.\n                <\/td>\n            <\/tr>\n\n        <\/tbody>\n\n    <\/table>\n\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"firmware_diagnostic_techniques\"><\/span><strong>Firmware Diagnostic Techniques<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Loopback Test<\/strong><\/h3>\n\n\n\n<p>A loopback test is the fastest way to determine whether a UART fault is in the hardware or firmware. Connect the TX pin of the MCU directly to its own RX pin (a hardware loopback). Then transmit a known byte pattern (e.g., 0x55, 0xAA alternating) and verify that what is received exactly matches what was transmitted. If the loopback test passes, the MCU&#8217;s UART peripheral and firmware are functioning correctly and the fault is in the external cable, the remote device, or the level shifting circuitry. If the loopback test fails, the fault is in the MCU&#8217;s UART configuration, firmware, or the GPIO pin assignment (verify that the TX and RX pins are assigned to the correct alternate function in the pinmux or IO-MUX configuration).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Reading the Error Register in Firmware<\/strong><\/h3>\n\n\n\n<p>After each received byte, firmware should log the UART status register value alongside the received data. During debugging, this reveals which error flags are set and at what rate. STM32 example (HAL-based): in the UART receive interrupt handler, after HAL_UART_IRQHandler() calls HAL_UART_RxCpltCallback(), the error code is available in huart-&gt;ErrorCode. The bit mask definitions (HAL_UART_ERROR_FE = 0x04, HAL_UART_ERROR_NE = 0x02, HAL_UART_ERROR_ORE = 0x08, HAL_UART_ERROR_PE = 0x01) can be tested against this value to log specific error types. Maintaining cumulative counters for each error type over time and reporting them via a debug console is the most effective way to characterise intermittent UART issues that do not appear on a single oscilloscope capture.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Auto-Baud Detection<\/strong><\/h3>\n\n\n\n<p>Some UART peripherals (STM32 USART in auto-baud mode, Silicon Labs USART with autobaud, Espressif ESP32 UART in autobaud) can measure the duration of the first received character and automatically set the BRR to match the transmitter&#8217;s baud rate. Auto-baud detection is useful when the baud rate of the remote device is unknown or when targeting interoperability with multiple baud rates. It works by measuring the width of the start bit or the first 0x55 byte (which presents a known bit pattern of alternating 0 and 1). Auto-baud detection eliminates baud rate mismatch as a failure mode but does not resolve logic level incompatibility or configuration mismatches in data bits, parity, or stop bits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"frequently_asked_questions\"><\/span><strong>Frequently Asked Questions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1795789763912\"><strong class=\"schema-faq-question\"><strong>Q1: What causes UART framing errors?<\/strong><\/strong> <p class=\"schema-faq-answer\">A UART framing error occurs when the receiver detects a LOW signal instead of the expected HIGH stop bit. Common causes include baud rate mismatch, incorrect data-bit or parity settings, electrical noise, and BREAK conditions. Checking the signal with an oscilloscope and verifying UART settings can help identify the issue.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1795789777956\"><strong class=\"schema-faq-question\">\u00a0<strong>Q2: How much baud rate mismatch can UART tolerate?<\/strong><\/strong> <p class=\"schema-faq-answer\">UART typically tolerates approximately 2% combined baud rate error, although the exact limit depends on frame length and receiver oversampling. Excessive clock mismatch can shift sampling points and cause incorrect data reception. Internal RC oscillators are more likely to cause timing issues than crystal-based clocks.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1795789792678\"><strong class=\"schema-faq-question\">\u00a0<strong>Q3: Can I connect a 5V UART to a 3.3V UART directly?<\/strong><\/strong> <p class=\"schema-faq-answer\">A 3.3V TX may work with a 5V RX, depending on its input thresholds. However, connecting a 5V TX directly to a non-5V-tolerant 3.3V RX can damage it. Check the datasheet or use a level shifter or voltage divider to protect the 3.3V device.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1795789808298\"><strong class=\"schema-faq-question\">\u00a0<strong>Q4: What is an overrun error (ORE) in UART?<\/strong><\/strong> <p class=\"schema-faq-answer\">A UART overrun error occurs when a new byte arrives before the previous byte has been read from the receive data register. The previous data may be lost, and the ORE flag is set. Interrupts, DMA, larger buffers, or faster data processing can help prevent overruns.\u00a0<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1795789823561\"><strong class=\"schema-faq-question\">\u00a0<strong>Q5: What is the difference between UART, USART, and RS-232?<\/strong><\/strong> <p class=\"schema-faq-answer\">UART supports asynchronous serial communication using start and stop bits. USART supports both synchronous and asynchronous communication. RS-232 defines electrical signal levels and communication interface characteristics, so a level converter such as MAX232 is required when connecting UART logic to an RS-232 interface.\u00a0<\/p> <\/div> <\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Reliable UART communication depends on accurate baud rate configuration, compatible logic levels, correct frame settings, and proper signal integrity. When troubleshooting issues such as garbage characters, framing errors, or data loss, start by checking the idle line state, measuring the actual baud rate, and verifying UART settings on both devices. An oscilloscope can help identify timing problems, noise, and signal-level issues, while firmware error flags reveal reception and buffer-related faults.<\/p>\n\n\n\n<p>For reliable operation, use suitable clock sources, proper level shifting, adequate receive buffers, and hardware flow control when needed. These checks help identify UART communication problems early and improve system stability across embedded applications.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flywing-tech.com\/category\/integrated-circuits-ics\/drivers-receivers-transceivers\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"2160\" height=\"798\" src=\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/12\/interface-drivers-receivers-transceivers-for-reliable-data-communication.png\" alt=\"Interface drivers, receivers, and transceiver ICs used for signal transmission and data communication in industrial, embedded, and networking systems.\" class=\"wp-image-10310\" \/><\/a><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>UART troubleshooting: fast diagnosis summary Garbage characters, framing errors, and missing UART data often result from baud rate mismatches, incorrect UART settings, logic-level incompatibility, or electrical noise. Measure the TX bit period, verify UART configuration on both devices, check signal voltage levels, and review firmware error flags to identify the cause. Symptom Most Likely Cause [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":10308,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[377,1915,380],"tags":[1917,1923,713,1918,1733,1919,1924,1925,1920,1921,1922,276,714,1916,1926],"class_list":["post-10300","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-experience-sharing","category-serial-communication-technical-tutorial","category-technical-tutorial","tag-baud-rate","tag-embedded-hardware","tag-esp32","tag-framing-error","tag-level-shifter","tag-logic-levels","tag-oscilloscope-debugging","tag-overrun-error","tag-rs-232","tag-rs-485","tag-serial-protocol","tag-signal-integrity","tag-stm32","tag-uart","tag-uart-troubleshooting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>UART Troubleshooting Baud Rate, Logic Levels and Framing Errors - Fly-Wing<\/title>\r\n<meta name=\"description\" content=\"Learn UART troubleshooting techniques to identify baud rate mismatches, framing errors, logic level issues, and signal integrity problems.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors - Fly-Wing\" \/>\r\n<meta property=\"og:description\" content=\"Learn UART troubleshooting techniques to identify baud rate mismatches, framing errors, logic level issues, and signal integrity problems.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\" \/>\r\n<meta property=\"og:site_name\" content=\"Fly-Wing\" \/>\r\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/profile.php?id=100090565081283\" \/>\r\n<meta property=\"article:published_time\" content=\"2026-12-01T10:47:48+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2026-12-01T10:47:50+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"2610\" \/>\r\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"Flywing Tech Blog\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@MIKEBigcoolguy\" \/>\r\n<meta name=\"twitter:site\" content=\"@MIKEBigcoolguy\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Flywing Tech Blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"24 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\"},\"author\":{\"name\":\"Flywing Tech Blog\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/person\/54b4930c1e0b706d6c16518160e005d6\"},\"headline\":\"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors\",\"datePublished\":\"2026-12-01T10:47:48+00:00\",\"dateModified\":\"2026-12-01T10:47:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\"},\"wordCount\":4875,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png\",\"keywords\":[\"Baud Rate\",\"Embedded Hardware\",\"ESP32\",\"Framing Error\",\"level shifter\",\"Logic Levels\",\"Oscilloscope Debugging\",\"Overrun Error\",\"RS-232\",\"RS-485\",\"Serial Protocol\",\"Signal Integrity\",\"STM32\",\"UART\",\"UART Troubleshooting\"],\"articleSection\":[\"Experience Sharing\",\"Serial Communication\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#respond\"]}]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\",\"url\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\",\"name\":\"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors - Fly-Wing\",\"isPartOf\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png\",\"datePublished\":\"2026-12-01T10:47:48+00:00\",\"dateModified\":\"2026-12-01T10:47:50+00:00\",\"description\":\"Learn UART troubleshooting techniques to identify baud rate mismatches, framing errors, logic level issues, and signal integrity problems.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789763912\"},{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789777956\"},{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789792678\"},{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789808298\"},{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789823561\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage\",\"url\":\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png\",\"contentUrl\":\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png\",\"width\":2610,\"height\":1200,\"caption\":\"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.flywing-tech.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\/\/www.flywing-tech.com\/blog\/category\/technical-tutorial\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#website\",\"url\":\"https:\/\/www.flywing-tech.com\/blog\/\",\"name\":\"Fly-Wing\",\"description\":\"Electronic Components Source @Fly-Wing\",\"publisher\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.flywing-tech.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#organization\",\"name\":\"Fly-wing Technology (HK) Co., Limited\",\"alternateName\":\"Fly-wing Technology\",\"url\":\"https:\/\/www.flywing-tech.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2025\/06\/512_512.png\",\"contentUrl\":\"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2025\/06\/512_512.png\",\"width\":512,\"height\":512,\"caption\":\"Fly-wing Technology (HK) Co., Limited\"},\"image\":{\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/profile.php?id=100090565081283\",\"https:\/\/x.com\/MIKEBigcoolguy\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/person\/54b4930c1e0b706d6c16518160e005d6\",\"name\":\"Flywing Tech Blog\",\"description\":\"This blog is maintained by the editorial team at Fly-Wing Technology. We aim to share valuable insights on electronic components, industry trends, and practical engineering guides to support global developers and buyers.\",\"sameAs\":[\"https:\/\/www.flywing-tech.com\/blog\/\"],\"url\":\"https:\/\/www.flywing-tech.com\/blog\/author\/content_manager_03\/\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789763912\",\"position\":1,\"url\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789763912\",\"name\":\"Q1: What causes UART framing errors?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"A UART framing error occurs when the receiver detects a LOW signal instead of the expected HIGH stop bit. Common causes include baud rate mismatch, incorrect data-bit or parity settings, electrical noise, and BREAK conditions. Checking the signal with an oscilloscope and verifying UART settings can help identify the issue.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789777956\",\"position\":2,\"url\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789777956\",\"name\":\"\u00a0Q2: How much baud rate mismatch can UART tolerate?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"UART typically tolerates approximately 2% combined baud rate error, although the exact limit depends on frame length and receiver oversampling. Excessive clock mismatch can shift sampling points and cause incorrect data reception. Internal RC oscillators are more likely to cause timing issues than crystal-based clocks.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789792678\",\"position\":3,\"url\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789792678\",\"name\":\"\u00a0Q3: Can I connect a 5V UART to a 3.3V UART directly?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"A 3.3V TX may work with a 5V RX, depending on its input thresholds. However, connecting a 5V TX directly to a non-5V-tolerant 3.3V RX can damage it. Check the datasheet or use a level shifter or voltage divider to protect the 3.3V device.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789808298\",\"position\":4,\"url\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789808298\",\"name\":\"\u00a0Q4: What is an overrun error (ORE) in UART?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"A UART overrun error occurs when a new byte arrives before the previous byte has been read from the receive data register. The previous data may be lost, and the ORE flag is set. Interrupts, DMA, larger buffers, or faster data processing can help prevent overruns.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789823561\",\"position\":5,\"url\":\"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789823561\",\"name\":\"\u00a0Q5: What is the difference between UART, USART, and RS-232?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"UART supports asynchronous serial communication using start and stop bits. USART supports both synchronous and asynchronous communication. RS-232 defines electrical signal levels and communication interface characteristics, so a level converter such as MAX232 is required when connecting UART logic to an RS-232 interface.\u00a0\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors - Fly-Wing","description":"Learn UART troubleshooting techniques to identify baud rate mismatches, framing errors, logic level issues, and signal integrity problems.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/","og_locale":"en_US","og_type":"article","og_title":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors - Fly-Wing","og_description":"Learn UART troubleshooting techniques to identify baud rate mismatches, framing errors, logic level issues, and signal integrity problems.","og_url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/","og_site_name":"Fly-Wing","article_publisher":"https:\/\/www.facebook.com\/profile.php?id=100090565081283","article_published_time":"2026-12-01T10:47:48+00:00","article_modified_time":"2026-12-01T10:47:50+00:00","og_image":[{"width":2610,"height":1200,"url":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png","type":"image\/png"}],"author":"Flywing Tech Blog","twitter_card":"summary_large_image","twitter_creator":"@MIKEBigcoolguy","twitter_site":"@MIKEBigcoolguy","twitter_misc":{"Written by":"Flywing Tech Blog","Est. reading time":"24 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#article","isPartOf":{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/"},"author":{"name":"Flywing Tech Blog","@id":"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/person\/54b4930c1e0b706d6c16518160e005d6"},"headline":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors","datePublished":"2026-12-01T10:47:48+00:00","dateModified":"2026-12-01T10:47:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/"},"wordCount":4875,"commentCount":0,"publisher":{"@id":"https:\/\/www.flywing-tech.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png","keywords":["Baud Rate","Embedded Hardware","ESP32","Framing Error","level shifter","Logic Levels","Oscilloscope Debugging","Overrun Error","RS-232","RS-485","Serial Protocol","Signal Integrity","STM32","UART","UART Troubleshooting"],"articleSection":["Experience Sharing","Serial Communication","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#respond"]}]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/","url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/","name":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors - Fly-Wing","isPartOf":{"@id":"https:\/\/www.flywing-tech.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage"},"image":{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage"},"thumbnailUrl":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png","datePublished":"2026-12-01T10:47:48+00:00","dateModified":"2026-12-01T10:47:50+00:00","description":"Learn UART troubleshooting techniques to identify baud rate mismatches, framing errors, logic level issues, and signal integrity problems.","breadcrumb":{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789763912"},{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789777956"},{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789792678"},{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789808298"},{"@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789823561"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#primaryimage","url":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png","contentUrl":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2026\/11\/uart-troubleshooting-baud-rate-logic-levels-and-framing-errors.png","width":2610,"height":1200,"caption":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors"},{"@type":"BreadcrumbList","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.flywing-tech.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/www.flywing-tech.com\/blog\/category\/technical-tutorial\/"},{"@type":"ListItem","position":3,"name":"UART Troubleshooting Baud Rate, Logic Levels and Framing Errors"}]},{"@type":"WebSite","@id":"https:\/\/www.flywing-tech.com\/blog\/#website","url":"https:\/\/www.flywing-tech.com\/blog\/","name":"Fly-Wing","description":"Electronic Components Source @Fly-Wing","publisher":{"@id":"https:\/\/www.flywing-tech.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.flywing-tech.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.flywing-tech.com\/blog\/#organization","name":"Fly-wing Technology (HK) Co., Limited","alternateName":"Fly-wing Technology","url":"https:\/\/www.flywing-tech.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2025\/06\/512_512.png","contentUrl":"https:\/\/www.flywing-tech.com\/blog\/wp-content\/uploads\/2025\/06\/512_512.png","width":512,"height":512,"caption":"Fly-wing Technology (HK) Co., Limited"},"image":{"@id":"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/profile.php?id=100090565081283","https:\/\/x.com\/MIKEBigcoolguy"]},{"@type":"Person","@id":"https:\/\/www.flywing-tech.com\/blog\/#\/schema\/person\/54b4930c1e0b706d6c16518160e005d6","name":"Flywing Tech Blog","description":"This blog is maintained by the editorial team at Fly-Wing Technology. We aim to share valuable insights on electronic components, industry trends, and practical engineering guides to support global developers and buyers.","sameAs":["https:\/\/www.flywing-tech.com\/blog\/"],"url":"https:\/\/www.flywing-tech.com\/blog\/author\/content_manager_03\/"},{"@type":"Question","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789763912","position":1,"url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789763912","name":"Q1: What causes UART framing errors?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"A UART framing error occurs when the receiver detects a LOW signal instead of the expected HIGH stop bit. Common causes include baud rate mismatch, incorrect data-bit or parity settings, electrical noise, and BREAK conditions. Checking the signal with an oscilloscope and verifying UART settings can help identify the issue.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789777956","position":2,"url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789777956","name":"\u00a0Q2: How much baud rate mismatch can UART tolerate?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"UART typically tolerates approximately 2% combined baud rate error, although the exact limit depends on frame length and receiver oversampling. Excessive clock mismatch can shift sampling points and cause incorrect data reception. Internal RC oscillators are more likely to cause timing issues than crystal-based clocks.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789792678","position":3,"url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789792678","name":"\u00a0Q3: Can I connect a 5V UART to a 3.3V UART directly?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"A 3.3V TX may work with a 5V RX, depending on its input thresholds. However, connecting a 5V TX directly to a non-5V-tolerant 3.3V RX can damage it. Check the datasheet or use a level shifter or voltage divider to protect the 3.3V device.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789808298","position":4,"url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789808298","name":"\u00a0Q4: What is an overrun error (ORE) in UART?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"A UART overrun error occurs when a new byte arrives before the previous byte has been read from the receive data register. The previous data may be lost, and the ORE flag is set. Interrupts, DMA, larger buffers, or faster data processing can help prevent overruns.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789823561","position":5,"url":"https:\/\/www.flywing-tech.com\/blog\/uart-troubleshooting\/#faq-question-1795789823561","name":"\u00a0Q5: What is the difference between UART, USART, and RS-232?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"UART supports asynchronous serial communication using start and stop bits. USART supports both synchronous and asynchronous communication. RS-232 defines electrical signal levels and communication interface characteristics, so a level converter such as MAX232 is required when connecting UART logic to an RS-232 interface.\u00a0","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/posts\/10300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/comments?post=10300"}],"version-history":[{"count":5,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/posts\/10300\/revisions"}],"predecessor-version":[{"id":10311,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/posts\/10300\/revisions\/10311"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/media\/10308"}],"wp:attachment":[{"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/media?parent=10300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/categories?post=10300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flywing-tech.com\/blog\/wp-json\/wp\/v2\/tags?post=10300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}