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:

1817 questions
3
votes
1 answer

Raspberry Pi UART program in C using termios receives garbage (Rx and Tx are connected directly)

I have a simple program written in C which uses termios to send a basic string to the Raspberry Pi UART and attempts to read and output the response. The Rx and Tx pins on the Raspberry Pi are connected with a jumper so whatever is sent should be…
kourosh
  • 41
  • 1
  • 2
  • 3
3
votes
1 answer

PIC32 UART Drops bytes

The problem An external source sends these four bytes 0x2A, 0x42, 0x78, 0x25 The PIC32 UART Does not generate an int The external source sends one more byte The PIC32 UART then generates an int In that int, Only the 0x25 byte from the previous…
User.1
  • 2,562
  • 3
  • 33
  • 40
3
votes
1 answer

C library for interfacing microcontroller and AT modem

I am working on some embedded system, where I use low-end uC, i.e. Atmega128. My system also includes modem, driven via AT commands. I tried to look for any appropriate C library (for GCC), but couldn't find any. Although I know that putting "all"…
TomiL
  • 671
  • 2
  • 11
  • 25
3
votes
5 answers

Receive message of undefined size in UART in C

I'm writing my own drivers for LPC2148 and a question came to mind. How do I receive a message of unspecified size in UART? The only 2 things that come to mind are: 1 - Configure a watchdog and end the receiving when the time runs out. 2- make it…
morcillo
  • 1,091
  • 5
  • 19
  • 51
3
votes
1 answer

Blocking I/O Write Operation on UART Serial Port in Linux

I am trying to communicate with a device over a RS-485 half duplex serial line. When I send a command to the device, it processes the command and replies immediately after processing. The problem is I have to turn my RS-485 chip into receive mode…
ibrahim
  • 113
  • 8
2
votes
1 answer

Enabling ATTINY1626 UART RX interrupt doesn't trigger ISR, how to resolve?

I have a receive interrupt issue with ATTINY1626. In pooling mode I can able to receive UART data. But it is not happening by enabling UART RX interrupt. I don't know where I missed some configuration related to interrupts. Please suggest me if…
2
votes
2 answers

Missing Last Byte On Circular Buffer Burst

Thanks to help from another user, I have implemented a simple circular buffer to read in some UART data, do some minor processing, then transmit on another UART. I receive a stream of 10-20 6-byte packets based on some user interaction with an…
nobby
  • 373
  • 1
  • 3
  • 15
2
votes
0 answers

How can I send ADC value to Serial Port

I want to able to send my ADC values to a Nodemcu to put them a Web UI but I even could not send any UART value to a serial port and I did not catch the problem. I set my variables and libs like: #include "stdio.h" #include "string.h" uint8_t…
2
votes
2 answers

Why the usbser.sys is not used with a USB CDC-ACM device?

The Microsoft article "USB serial driver (Usbser.sys)" tells that: If you want to load Usbser.sys automatically, set the class code to 02 and subclass code to 02 in the Device Descriptor. If I program a STM32 MCU with a CDC example with 02 class…
Arseniy
  • 266
  • 2
  • 14
2
votes
1 answer

Advice on writing a custom bootloader for stm32 MCU

Assume there are two boards with stm32 micro-controllers which are connected to each other with rs-485 (each board has a uart-to-rs485 transceiver). This is the connection diagram and the accessible ports: I want to be able to re-program each board…
mehdi
  • 167
  • 11
2
votes
1 answer

I'm trying to receive UART interrupts

I want to receive UART interrupts, but shouldn't the basic structure of the interrupts be made like that? Sometimes it doesn't work and sometimes it prints out printf ("test\r\n") but sometimes it doesn't print out the received data, but I don't…
user15504267
2
votes
0 answers

sending data to UART driver on BeagleBone from PC via USB serial adapter

I am trying to send data from PC using minicom program to BeagleBone driver via USB serial adapter cp2102. I am using the driver whose code is here. I connect the adapter to bbg this way : serial device TX -> beaglebone UART2 RX pin 22 serial…
2
votes
3 answers

AML-S905X-CC (Le Potato). How to enable and use UART on 40 pin header as TTY

I want to use the UART on the 40 pin header (pins 8 and 10) of the AML-S905X-CC (Le Potato). I have tried a couple of O/S like Raspbian Stretch Headless and Armbian, and while the boot and work fine, there seems to be no support for the on board…
ADL
  • 41
  • 2
2
votes
0 answers

Error about using pl2303 with raspberry Pi 4 Model B

I want to use uart to debug the raspberry Pi. Firstly, I using the Ubuntu20.04(virtual environment) to check the performance of TTL convert usb. When I prepare the raspberry Pi OS, and config the uart in it like…
zcc
  • 21
  • 5
2
votes
2 answers

writting 0D 0A insted of 0A when I tried to write into uart

The following code configures UART port. const char *UART2_path="/dev/ttymxc2"; int UART2; void UART2_open(const char *UART2_path) { int flags = O_RDWR | O_NOCTTY ; …
Rajesh D
  • 63
  • 3