UART

From datarecoverywiki.com
Revision as of 11:29, 3 March 2025 by Admin (talk | contribs)
Jump to navigation Jump to search

Data Recovery Resources

Background information

This page will cover Universal asynchronous receiver/transmitter (UART) protocol, how it functions, how to communicate with a device over it, and where to find ports that allow access.
UART or Universal asynchronous receiver/transmitter is often used as a low level protocol to comicate with devices, such as HDD controllers, It is asynchronous meaning it does not have a clock(clk) line
there for relies on an external clock.(this will be covered later in the Baud Rate section)
The UART protocol runs off two data lines plus ground(three in total), these are
2.0 connections

  • Transmit(TX)
  • Receive(RX)
  • Ground(GND)


The lines are typically connected to its opposite(e.g. TX to RX, RX to TX, GND to GND)


3.0 Protocol configation
There are five main aspects to communicating over UART, with two additional (Break condition, idle state) conditions.
1. Baud Rate
Due to UART being Asynchronous and lacking a clock(clk) signal, A baud rate measured in bits per second(BPS) must be set for data to be transmitted at the same speed by both devices
otherwise data will not be transmitted correctly Both sides of the commication must be operating at the same speed otherwise commination will not be successful.
the most commonly used bod rates are, 9600,19200,38400,57600,115200.
2. Data bits
As the name suggests data bits is the size of the data packets that are being sent with the most common size being 8 data bits per package however other sizes are possible.
Logically the bigger the data bits the more data they can carry but the slower the transfer rate due to the increased size.
3. Parity
Parity also know as error checking is a optional(typically not used) but useful bit within the commication packet as it can aid in the dectection of packet corruption
Note the use of the word aid as like most systems it is not perfect so data corruption may still occur.
  • None- nothing used
  • Even - parity bit is set to make all the 1's even
  • odd - parity bit is set to make all the 1's odd

4. Stop Bits Stop bits denote the end of each packet which allows for the receiver to recognize the end of each packet then the start of a new one. typically the stop bits are only one bit but can also be two 5. Flow Control
Flow control is responsible for making sure the data transfer speeds are kept consistent regardless of the fact one device maybe faster than the other.
  • None - no control
  • Hardware - The use of two additional pins Request To Send(RTS),Clear To Send(CTS) to indicate when a device requires more data or is ready for more data.
  • Software - uses special charters(XON to resume, XOFF to pause) which are placed within the data for the other device to register

  • 6. Break condition A Break condition is similar to a time out, if a extended period of low voltage(e.g no activity/break) occurs then a break condition is applied, can be used as a control signal
    7. Idle state Idle state defines how the lines appear when there is not data being transmitted(typically a high voltage)

    What tools you will need

    Items are not listed in any particular order

    Required

    • UART to usb adapter
    • jumper wires
    • serial terminal

    Optional but useful

    • Multimeter
    • Soldering iron
    • baud rate dection tool

    Step-by-step guide with images

    Insert step-by-step walkthrough with images and summary text here

    Flow chart of order of operations

    Insert a flow chart of steps and actions for each task (create using diagram)

    Troubleshooting/tips and tricks

    Fixes to any common issues that were encountered or could be easily encountered

    different confiuration settings can be tried without damage to the devices

    Related Topics

    Topics such as desoldering to chip off or firmware dumping for disk PCB repairs

    Further reading

    External references in wiki references can just be cited through the keyword link

    1. Reference 1: UART basic's guide
    2. Reference 2: UART specification