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

STM32 Interrupt driven UART receival fails after several flawless receives

Please note the clarification and update at the end of the post TL;DR: An STM32 has 3 UART connections, 1 for debugging and 2 for actual communication which use the interrupt-driven HAL_UART_Receive_IT. Initially, interrupt driven UART receive works…
iMrFelix
  • 335
  • 2
  • 18
3
votes
1 answer

Why are "\000" characters being inserted between characters of a char array?

I am attempting to read an incoming stream of data from UART, and trying to add each character received to an array of char until characters \r and \n are received (in that order). I have written a function (char read_uart()) to wait for then return…
Starman
  • 168
  • 1
  • 11
3
votes
3 answers

Is there a format processor to write my own printf-like function and keep the %d style arguments, without using sprintf?

I'm writing a serial interface for an MCU, and I want to know how one would create a printf-like function to write to the serial UART. I can write to the UART, but to save memory and stack space, and avoid temp string buffers, I would prefer to do…
KJ7LNW
  • 1,437
  • 5
  • 11
3
votes
1 answer

linux + minicom + FT232RL USB-to-UART adaptor send Carriage Return (CR) instead of Linefeed (LF)

Hello to this wonderful community. I use a computer with MX Linux as OS. I want to access a device with a serial/UART console (Specifically, the device is a minimal computer made from 74-series ICs. See…
3
votes
2 answers

Baud rate simulation

I need to create a null modem simulation to test various pieces of software. I've been using socat to do this: socat -d -d pty,raw,echo=0 pty,raw,echo=0 & But I also need to simulate the basic baud rates of the serial port and the effects of UART…
xl600
  • 71
  • 5
3
votes
2 answers

Issue in transmitting data over UART in STM32F103C8 ('Blue Pill')

I am beginner in embedded systems. I am trying to write data on UART2 of STM32F103C8 (i. e., the Blue Pill board) and want to see the data in one of the ports of my computer using an FTDI adapter, which is connected to UART2 of the STM32F103C8…
3
votes
2 answers

Creating new task in FreeRTOS for USART reception

I am using EVK1105 development board with AVR Studio 5 as development IDE for my AVR project. I am using FreeRTOS in it. I have 3 USART ports on this board. One external module is connected to my AVR32 board via USART-RS232 mode. It sends me…
Surjya Narayana Padhi
  • 7,741
  • 25
  • 81
  • 130
3
votes
0 answers

How to read data from UART in MikroC

Anyone here using MikroC to implement UART? I'm trying to connect a PIC18F4550 and SIM900. I want to use UART1_Read_Text(variable, delimiter, attempts). But since there is no specific length of the text that will be received, I'm trying to use NULL…
Granger
  • 35
  • 1
  • 5
3
votes
1 answer

How to receive an unknown length data using UART in an array and store it & receive next set of data, without deleting what's in the first register?

I have to receive an unknown length of data from a UART Interrupt serial communication. I have initialized an array, to store the data. Now, when I receive the data and store it byte by byte until the user enters \n, the data should be stored, and…
Dhrupad Umesh
  • 31
  • 1
  • 5
3
votes
1 answer

PIC16F887 receiving wrong UART Data

I'm making a cleaning robot in C (XC8) and I've got some problems with UART. Let me explain: The project got an UART communication between a PIC16F887 and a HC06. Before, the project has a PIC16F1455 and worked great. But I needed more and changed…
MAG
  • 133
  • 3
3
votes
1 answer

How to use I2C GPIO expander's pin instead of RTS to control the RS485 direction, in Linux AUART kernel driver?

I'm creating an embedded system based on i.MX287 processor from NXP(Freescale). I'm using a core processing board which is connected to my evaluation board via a mini PCIe connector. UARTs 0,3,4 are used as RS232 and UARTs 1,2 as RS485. The core…
embedded
  • 51
  • 7
3
votes
1 answer

How do I open/write/read a uart device from a kernel module?

The device is a scanner. I know uart5 is setup in the dtsi file and in userspace it is listed under /dev/ttymxc4. From userspace, I understand that I can manipulate the device by fd = open("/dev/ttymxc5", O_RDWR|O_NOCTTY|O_NONBLOCK); if (fd < 0) { …
Ryan
  • 436
  • 5
  • 15
3
votes
2 answers

UART transfer speed

I want to check if my understanding is correct, however I cannot find any precise explanation or examples. Let's say I have UART communication set to 57600 bits/second and I am transferring 8 bit chars. Let's say I choose to have no parity and since…
user1949350
  • 125
  • 3
  • 11
3
votes
1 answer

Linux Uart driver modification

I want to modify my linux kernel's (2.6.32) UART driver. I am using the standard uart driver for ttyS2 I dont know the exact files. The problem is Simple, setting and keeping a gpio pin high during transmission and while receving it must be…
yet
  • 773
  • 11
  • 19
3
votes
1 answer

Sending 16 bit values on 8 bit UART

We're trying to send a 16-bit value from one PSoC to another. The essence of this operation should be pretty simple: Split the value into two 8-bit values, one for MSB and one for LSB Send the MSB and then LSB from system 1 Recieve MSB and then LSB…
de_rush
  • 33
  • 1
  • 4