Questions tagged [usart]

USART stands for Universal Synchronous/Asynchronous Receiver/Transmitter is a modern IC which comes with a [UART](https://stackoverflow.com/tags/uart/info) that can also communicate synchronously. A USART is usually an individual (or part of an) integrated circuit used for serial communications over a computer or peripheral device serial port. The tag usart can be used for programming related questions of any usart device.

A Universal Synchronous/Asynchronous Receiver/Transmitter, abbreviated USART, is a piece of computer hardware that translates data between parallel and serial forms. USARTs 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.

A USART is usually an individual (or part of an) integrated circuit used for serial communications over a computer or peripheral device serial port. USARTs are now commonly included in microcontrollers. A dual UART, or DUART, combines two UARTs into a single chip. Many modern ICs now come with a UART that can also communicate synchronously; these devices are called USARTs (Universal Synchronous/Asynchronous Receiver/Transmitter).

The tag can be used for questions related to programming of a usart device, please note that https://electronics.stackexchange.com/ is another stackexchange website from where you can get answers for electronics related problems. Questions on Stackoverflow should be programming related.

See also tag .

263 questions
1
vote
1 answer

Read data from USART

I am programming an ARM Cortex M3. I have stdout functions operating on the USART port. How should I monitor the data sent through USART by my board on my Windows 7 computer? Is there standard "USART packet sniffers" I should use?
Randomblue
  • 112,777
  • 145
  • 353
  • 547
1
vote
3 answers

No data signal on USART_Tx pin on my STM32-Nucleo

I have some issues trying to transmit data with my USART pins. I use STM32-Nucleo-L476RG board with USART2 enabled. I generated the code with CubeMX and in my main() function, i call HAL_UART_Transmit() function to send data as the following : while…
1
vote
1 answer

Reading PS/2 Keyboard Scan Codes on STM32 L476RG

I am trying to read scan codes from a PS/2 keyboard on an STM32 L476RG (NUCLEO L476RG dev board). PS/2 and USART: I believe that I can use the USART hardware on the STM32 to read PS/2 data, if there is a reason why not then please help me…
M Tut
  • 69
  • 7
1
vote
0 answers

Receive serial data in MATLAB

I have a problem about receiving 16-bit data in MATLAB.I cannot receive 16-bit data at high speed through UART in MATLAB software. Using stm32, I divide a 16-bit data belonging to a sensor into two 8-bit data and send it to MATLAB through UART. And…
yaser kh
  • 11
  • 2
1
vote
0 answers

Rust version of Arduino SoftwareSerial

Is there a Rust alternative to the Arduino library providing the SoftwareSerial type, which allows one to use any two regular pins to do serial communication instead of having to do it through hardware?
weisbrja
  • 164
  • 10
1
vote
1 answer

USART not reading all modem responses

I send commands to the modem via USART1 and copy them to USART2. I copy the modem response to USART2. USART2 displays the modem's response to the first AT command (AT\r\n) "AT OK". The response to the second command (AT+CSCS?\r\n) is not displayed…
Ping-247
  • 21
  • 3
1
vote
1 answer

STM32F446 USART in DMA mode only transmitting once

I'm learning to use DMA on a STM32F446 and tried to send data over USART. The goal is to do some calculations and send the results to a PC via RS232. Here is my MWE: #include #include #include "stm32f446xx.h" #define BAUDRATE (…
Inor
  • 13
  • 3
1
vote
2 answers

Interrupt not returning control to main

Hi I'm using STM32G070 nucleo board and I was trying to learn how to use UART with interrupts. I made a simple led blinking program in the main and in the interrupt handler there is a simple echo program. The echo works fine but the led blinking…
1
vote
1 answer

stm32f3 discovery usart is not sending

Here is my simple register level program written in Rust. This after reading many blogs written in C. I am trying to configure register as they did in C for the discovery board but unfortunately it is not working as expected. I am trying sending a…
1
vote
3 answers

How can I add hysteresis to my ADC output?

I'm currently using C to program a microcontroller (microchip PIC18F4520) for a university project, to turn it into a very basic MIDI controller. My code uses the 4520's 10-bit ADC (analogue-digital converter) to read the position of a variable…
1
vote
1 answer

why is my PIC MCU sending garbage instead of correct words on the serial port?

I've written a simple code to send some string to pc using PIC18F26K22 MCU. this code works on some other MCUs but on this mcu I get continuous 0xFF on output !. If I write TXREG2='k' it does work ! but for sending a string it seems that the program…
Hesi
  • 113
  • 2
  • 10
1
vote
1 answer

STM32L011 cannot set USART in rx mode

I am using STM32L011K4T6. I want to receive a command from USART2 and do a specific action from that command. Data that is not that command should be ignored. My problem is that I don't receive any data on the USART. The RxCallback funtion is never…
andrei filip
  • 23
  • 1
  • 8
1
vote
0 answers

STM32 USART LL Interrupt

I am using the NUCLEO-L053R8 board to communicate with a peripheral over USART. I started to send commands which are working fine. The peripheral transmits the data to the corresponding device. After a successfull send command the device answers…
1
vote
1 answer

Receiving a string through UART in STM32F4

I've written this code to receive a series of char variable through USART6 and have them stored in a string. But the problem is first received value is just a junk! Any help would be appreciated in advance. while(1) { …
1
vote
1 answer

Best way to pass a non-specified type as an argument in C++?

So I am currently writing an abstraction layer for some embedded systems. I normally do this in C, but i want to see if I can't work in some C++ to learn a little. I've run into an issue because I'm trying to abstract out a Usart class. The hw init…
Penguin
  • 21
  • 3