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
0 answers

STM32 cant send data with esp8266 thingspeak.what did I wrong?

I am working on a project about send PWM values and time values(with RTC) from stm32 to wifi module and bluetooth module at the same time.I wrote a code for esp8266 and esp8266 connected to my phone.But didnt send any value to bluetooth module or…
1
vote
1 answer

How can I change LED's brightness with PWM and USART in USART1_IRQHandler?

I am using STM32F4 discovery board and I am working on changing LED brightness and timer period using ADC and USART. I use DMA to fetch ADC values, selected TIM4 for PWM and selected USART1 for USART. ADC, USART and PWM are working well so far, but…
1
vote
0 answers

Forwarding / passthrough UART from one to another port

I'm pretty new to programming in C, but getting used to registers and the way communication in C works. Since UART using the official Arduino read() / write() creates a high delay in passing commands through, I tried to translate this Arduino sketch…
Tomblarom
  • 1,429
  • 1
  • 15
  • 38
1
vote
1 answer

Can bytes be lost when using HAL_UART_Receive_IT() and HAL_UART_RxCpltCallback()?

I have some (mostly CubeMX-generated) code: volatile uint8_t buf[4]; int main(void) { ... HAL_UART_Receive_IT(&huart3, buf, sizeof(buf)); while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /*…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
1
vote
0 answers

hrtimer state gets changed, and getting crash while accessing it via user defined soft-uart driver

I have taken the Software-based serial port module code from [here] (https://github.com/adrianomarto/soft_uart/) and implemented it for my application for the iMX-6 processor. Although my driver is working fine to send/receive data between MCU…
1
vote
0 answers

Is it possible to have enable BOTH Driver enable signal and hardware address wake up on stm32L USART?

I would like to implement an RS485 Link master using STM32L053 that only receives words when it is woken up by hardware address matching (9 bit data with msb set for address marker). On the face of it the Multiprocessor mode allows the address wake…
Phil Mundy
  • 11
  • 1
1
vote
0 answers

How does the STM32F446RE Bootloader work?

I want to connect the STM32F446RE (in the bootloader mode) via USART with my PC to flash some hexfiles on it. Between the USB port & the STM (USART1) I got an USB to USART bridge (CP2102). I used the STM32CubeProgrammer to connect the STM32F446RE…
Melissa123
  • 55
  • 1
  • 10
1
vote
1 answer

USART cant receive data

I don't understand what is wrong with the following code. All is correct for transmit but for the receive the interrupt isn't called. The oscilloscope shows me correct send and receive data. #define CONSOLE_RXD_PIN 12 #define CONSOLE_TXD_PIN …
makurisan
  • 467
  • 3
  • 13
1
vote
1 answer

Can we edit callback function HAL_UART_TxCpltCallback for our convenience?

I am a newbie to both FreeRTOS and STM32. I want to know how exactly callback function HAL_UART_TxCpltCallback for HAL_UART_Transmit_IT works ? Can we edit that that callback function for our convenience ? Thanks in Advance
Vignesh
  • 55
  • 3
  • 12
1
vote
1 answer

Bitshifting vs array indexing, which is more appropriate for usart interfaces on 32bit MCUs

I have an embedded project with a USART HAL. This USART can only transmit or receive 8 or 16 bits at a time (depending on the usart register I chose i.e. single/double in/out). Since it's a 32-bit MCU, I figured I might as well pass around 32-bit…
BitShift
  • 977
  • 2
  • 9
  • 28
1
vote
0 answers

Serial communication on STM32F303 using HAL - Rx not working

I am using an STM32F303RE Nucleo board connected to my own PCB to do RS-232 serial communications, and I can't figure out why this code doesn't work in certain circumstances. I'm using HAL functions (HAL_UART_Transmit and HAL_UART_Receive) for my…
dcprime
  • 21
  • 4
1
vote
1 answer

Data sent through serial on arduino gets byte-shifted sometimes

I'm sending data through USART on an Arduino Due. I'm currently filling a buffer so the data gets sent just when a buffer is full. The data I'm putting into the buffer is a lookup table of different wave shapes with 12 bits of depth (values from 0…
1
vote
2 answers

STM32L4xx USART Low temperature

I have got a problem with an electronic board based on a TSM32L4xx microcontroler. I am using HAL driver for all peripherals initilization. I use USART3 to communicate in RS232 with a computer When the microcontroler rise under -6°C (in a freeze),…
Baptiste
  • 41
  • 7
1
vote
1 answer

STM32 StdPeriph library USART example

I downloaded Stdperiph library and i want to make USART example run on STM32F4 - Discovery. I chose STM32F40_41xxx workplace, added stm32f324x7i.c file and compiled without any errors. Issue is that I cant receive expected message in my terminal…
V.CHR.
  • 31
  • 1
  • 6
1
vote
2 answers

AVR - High speed interrupt driven UART code not working

I want to make a interrupt driven uart program, to send large amounts of data at high speeds with the absolute minimal amount of cpu overhead. I combined existing code and reading of the datasheet to make this code. It compiles without errors or…