Questions tagged [uart]

A Universal Asynchronous Receiver/Transmitter (UART) is used for serial (where each bit of data is transmitted along the same connection) communications over a computer or peripheral device serial port.

UART is usually an individual (or part of an) integrated circuit used for serial communications over a computer or peripheral device serial port. UARTs are now commonly included in microcontrollers.

Simple serial link via UART uses two lines TxD and RxD, other than ground, for transmit and receive data:

Simple UART connection

It is asynchronous communication. Hence data transfer settings (number of bits, baudrate etc.) should be matched between devices wanting to communicate. The electric signaling levels and methods are handled by a driver circuit external to the UART.

More information:

1558 questions
7
votes
1 answer

What type of framing to use in serial communication

In a serial communication link, what is the prefered framing/sync method? framing with SOF and escaping sequences, like in HDLC? relying on using a header with length info and CRC? It's an embedded system using DMA transfers of data from UART to…
user2479653
  • 359
  • 3
  • 13
7
votes
1 answer

How do the CLOCAL and CRTSCTS Flags in termios.c_cflag Affect the Serial Port?

I want to configure a UART to use the Hardware Flow Control lines RTS and CTS in Linux. According to http://linux.die.net/man/3/termios, CRTSCTS enables RTS/CTS (hardware) flow control, and CLOCAL configures the serial port to ignore modem control…
Samuel
  • 5,919
  • 6
  • 35
  • 39
7
votes
2 answers

Emulating UART over USB

Does anybody know if it's possible to emulate UART (simple serial transmit and receive) over USB? How would this be accomplished? I found this link on the Microchip website, but it's not very…
Jim Fell
  • 12,390
  • 29
  • 117
  • 192
6
votes
2 answers

Correct way of implementing a uart receive buffer in a small ARM microcontroller?

I am looking for ideas for a receive buffer for a small application dealing with 15 byte packets at 921.6Kbaud over rs485. I am thinking of using a circular buffer as the interface between the UART ISR and main. As it is a microprocessor I was…
Meter Code
  • 61
  • 1
  • 1
  • 3
6
votes
4 answers

Virtual ESC POS printer

I searched little bit for emulation of ESC/POS printer, but didn't found any thing more, then data parsers like this. In few words, I have Linux, I have device connected to my PC via UART/RS-232 port. I need some soft, that will listen to specific…
Olga Pshenichnikova
  • 1,151
  • 2
  • 14
  • 31
6
votes
1 answer

Can't get STM32F103RB usart1 to communicate with hc-05

I am unable to connect USART_1 with bluetooth hc-05. The Microcontroller is STM32F103RB. Here's the code (I am not using any library) #define APB2_FREQ 72000000 void USART1_Send(char* data) { unsigned int length = 0; while(data[length]…
Muzahir Hussain
  • 845
  • 2
  • 13
  • 30
6
votes
2 answers

PIC16F1829 UART RX Interrupt not working using MPLABX and XC8 compiler

I am new to writing firmware for 8-bit PICs and could use some help with my code. I am using a PIC16F1829 for an LED module which gets RX commands. I am just trying to get the basics setup like turn on LEDs when a certain value is received on RX…
humanistscience
  • 119
  • 1
  • 8
6
votes
1 answer

What does BREAK mean in real terms while using a UART?

The break and error indication glows up in real terms while communicating with RS-232. Sometimes, the CTS is also will be glowing. Due to this, the data in prints as junk for some time; later it gets corrected after a few reset of real term. This…
MVA
  • 73
  • 1
  • 7
6
votes
1 answer

Uart 16c950 linux speed above B4000000 (4Mbps)

everybody, i'm working with a high speed RS422 pci board (OXPCIe958) under Ubuntu. The device can work up to 15Mbps. I need to work at 10Mbps, but i notice that under Linux, if we use termois, the maximum speed that can be specified is B4000000 (4…
fdaniii
  • 95
  • 5
6
votes
2 answers

UART ISR Tx Rx Architecture

Am I complicating things? I'm architecting my code to talk from a 8051 micro to a peripheral device over UART. The peripheral responds to commands from the host and can only respond to one command at a time. It's a simple send and receive…
Jonathan
  • 1,410
  • 1
  • 19
  • 37
5
votes
1 answer

How tty driver interacts with UART driver during read/write opetations?

I am working on modification/development of a SDIO UART driver. And would like to know: How tty driver interacts with UART driver during read/write operations? I am interested in buffer management. I searched over net, however did not find…
TheCottonSilk
  • 8,134
  • 2
  • 24
  • 37
5
votes
1 answer

QEMU MIPS32 - 16550 Uart Implementation on a Custom Board

I’m trying to use QEMU to emulate a piece of firmware, but I’m having trouble getting the UART device to properly update the Line Status Register and display the input character. Details: Target device: Qualcomm QCA9533 (Documentation here if…
SwarthyMantooth
  • 1,541
  • 1
  • 13
  • 26
5
votes
1 answer

changing the baud rate of a serial port on a raspberry pi 3

I installed lineage os 14 on raspberry pi 3 I connected a gps module with UART port, however, the baud rate of GPS is 9600 but baud rate of /dev/ttyS0 is 115200 I want to change the baud rate of ttyS0 in order to read GPS data I tried stty…
Daniel.V
  • 2,081
  • 5
  • 21
  • 51
5
votes
6 answers

STM32: Implementing UART in DMA mode

I am trying to implement UART in DMA mode to transmit a simple string every time a push button is pressed. So I have used CubeMX to generate the code and I have configured UART2 TX DMA in normal (not circular) mode and also no FIFO and no…
Nixmd
  • 655
  • 4
  • 10
  • 17
5
votes
1 answer

Why does UART transmit interrupt fail to work in this case?

I am using stm32f0 MCU. I have a simple UART echo code in which every byte received will be transmitted out. I tested that it works. Here it is; uint8_t Rx_data[5]; uint32_t tx_timeout = 0; //Interrupt callback routine void…
user781486
  • 20,909
  • 45
  • 145
  • 253