Questions tagged [uart]

a Universal Asynchronous Receiver/Transmitter, better known as serial port

A Universal Asynchronous Receiver/Transmitter, abbreviated UART, is a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with communication standards such as EIA, RS-232, RS-422 or RS-485. The universal designation indicates that the data format and transmission speeds are configurable. The electric signaling levels and methods (such as differential signaling etc.) are handled by a driver circuit external to the UART.

381 questions
39
votes
11 answers

How to get more than one uart interface

Ok, I have one uart interface (TXD GPIO 14, RXD GPIO 15). I want at least one more uart interface. Possible solutions: Bit banging: Use two unrelated spare GPIOs. I understand that timing is a problem on a standard linux. Would it be reliable with…
tauran
  • 625
  • 1
  • 5
  • 8
14
votes
2 answers

How can I set the UART speed?

How should you set the baud rate of the UART Bonus question: What baud rates are available on the RPi? Edit: Since reading up from Steve's answer, I have found that there are two UARTs available. The mini-UART can work up to 32Mbaud, but has a small…
John La Rooy
  • 11,947
  • 9
  • 47
  • 75
10
votes
7 answers

True 9-bit serial port data?

I have an existing, half complete, vending machine project running on an Atmel UTC, which I want to port to the Pi. In order to talk to peripherals, such as coin acceptor, it has to support Multi-Drop Bus which has a 9-data bit serial port…
3
votes
4 answers

raspberry pi voltage rs-232 (uart)

I am trying to configure a sensor with serial communication (raspberry-sensor). But i have connected my sensor to a oscilloscope see photo. I don't know if i can connect it directly to my rspberry pin 14 15, is the voltage not too high? And how…
Remi
  • 33
  • 3
2
votes
1 answer

Simple command line to write and read data from UART (serial) loopback

I want to connect the TX and RX pins together and from the command line echo some text into /dev/ttyAMA0 and tail the result (from somewhere). I ultimately want to communicate with an Arduino but first I want to understand how to configure the Pi…
AJP
  • 169
  • 1
  • 2
  • 9
2
votes
4 answers

UART sends but not receives but works if tx-rx are bridged

I have this strange problem... When I connect TX and RX pins together (GPIO 14 and GPIO 15, Rev1) and I run minicom, I see everything that I type... so it works. But when I connect TX RX with an USB FTDI cable to my laptop and run minicom too, I can…
kapcom01
  • 149
  • 1
  • 7
2
votes
2 answers

How to disable DMA when using UART on the Raspberry Pi 2

I have a latency issue when using UART on Raspberry Pi 2 and I want to disable DMA when using UART driver. I know that the Raspberry Pi 2 uses ampa_pl011 and I don't want use DMA. Can you tell me how to do that on this driver? I tried to comment…
dongpham
  • 31
  • 8
2
votes
1 answer

Disable Raspberry Pi UART

Is it possible to disable UART in Raspberry Pi?? I undid what I have done to enable UART in Raspberry Pi, but UART pins(8 and 10) can't be freed because when I tested with an LED, it glows on boot-up automatically. Steps done: Uncommenting this…
Ron Thomas
  • 363
  • 2
  • 5
  • 14
2
votes
2 answers

How can I prevent Raspbian from resetting user privileges on /dev/tttyS0?

I've got a GPS module hanging on the TTL UART wires of my Pi 3B. I don't access the module directly, but via gpsd. Now I've got the following issue: At every reboot, Raspbian (Buster) seems to reset the group and the privilege mask of the…
Neppomuk
  • 452
  • 4
  • 16
2
votes
0 answers

Mini-UART on RPi 3 and earlier loses synchronization if parity bit used

I have a sensor which every 1 second spits out a 32-character serial stream at 9600 baud. I hooked it up to the mini-UART pins on the GPIO connector. What I saw was bad data. After staring at the received data (and looking at the actual data on an…
Larry Klein
  • 217
  • 1
  • 3
1
vote
2 answers

software solution for non-blocking UART communications

For UART communication on Raspberry Pi one can write a program in Python with the pyserial package or a program in C. Pyserial requires Threading for non-blocking UART, while C libraries allow to use a single core CPU. Thus for Raspberry pi Zero…
Nownuri
  • 179
  • 2
  • 9
1
vote
1 answer

Read & Write on UART don't work

I made a pair of programs to test UART function (GPIO 14 and 15 connected together). The read side works in a infinite loop and prints everything it got: #!/usr/bin/python import serial import time ser = serial.Serial("/dev/ttyAMA0") while True: …
jiandingzhe
  • 197
  • 1
  • 10
1
vote
0 answers

Pi UART Flow Control Doesn't Work - Pi's Tx to Peripheral's Rx

I have problem to get the Pi UART flow control working - Pi as tx and Peripheral as rx. I tried with a Pi2 and a PiZero. Here are the observations: Initially data flow is fine when peripheral's RTS (Pi's CTS) pin is asserted (logic low). When…
Ming Leung
  • 11
  • 2
1
vote
0 answers

uart interbyte time too long

I have problem about interbyte time with application using uart driver on raspberry pi 2. Interbyte time is time that each data byte sent via UART is delayed from the previous byte. With my application has interbyte time > 3ms, this time is too…
dongpham
  • 31
  • 8
1
vote
1 answer

Is this an acceptable way to set the rx/tx pins for uart1?

I'm on a Raspberry Pi Zero 2 W. Let's say I invoke this command. sudo dtoverlay uart1 txd1_pin=16 rxd1_pin=20 Does this then mean I can use those two pins via /dev/serial1? $ raspi-gpio get | grep -i alt=5 GPIO 16: level=0 fsel=2 alt=5…
Eric Johnson
  • 125
  • 5
1
2