Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

Using two UARTs to receive causes one UART to save data from another

I am working with the STM32-H7 microcontroller and am attempting to receive bytes from another microcontroller and then printing to Putty using the USB UART. I am using USART 2 and 6 with interrupts ...
yui1236's user avatar
0 votes
2 answers
58 views

How to disable Tx line of USB to Serial converter?

I have a working system where using a CH340 based USB to Serial converter I am sending data over UART to an ATMEGA16 microcontroller at a baud rate of 9600. Now I am trying to implement an other ...
klema's user avatar
  • 13
0 votes
2 answers
88 views

Efficient Padding for UART to Minimize Power Consumption

So, I am implementing a custom protocol over UART (data field in the packet is fixed at 8 bytes + contains a len field). If the data len is less than 8 bytes, 0xFF is being used for padding. I ...
dsoham's user avatar
  • 3
2 votes
3 answers
715 views

Confusion with polling data by an MCU using UART

I'm using an MCU board(STM32 with HAL) and basically polling data from a device using serial protocol. The MCU sends a fixed byte array(6 bytes) to the device, and in response it receives a fixed byte ...
user1245's user avatar
  • 4,385
0 votes
1 answer
299 views

Why would a UART only transmit the first character and then stop?

For some context I'm using a STM32H7A3 chip: reference manual With this UART and pin configuration: ...
ultraturbonoob's user avatar
0 votes
1 answer
344 views

How to receive from UART via DMA on STM32F4?

Thanks to help from this site, my code can send and receive over the STM32F446RE Nucleo UART (using the Nucleo's built-in ST-Link / VCP). I'm now trying to move the receive to DMA, and seem to get a ...
SRobertJames's user avatar
  • 1,347
0 votes
1 answer
152 views

How should I debug this ARM Cortex M STM32 UART write?

I have a STM32F446RE on a Nucleo F446RE, and I'm trying to learn how to program the UART to write over the Virtual COM Port (connected to USART2). I'm able to download someone else's code, modify it ...
SRobertJames's user avatar
  • 1,347
0 votes
1 answer
333 views

How connect the STlink on NUCLEO f401RE to communicate with STM32F4 discovery?

I have this configuration of MCUs. I need to know how connect the STlink on NUCLEO to discovery because I need the Virtual com PORT.
Cristian DAuria 's user avatar
0 votes
0 answers
172 views

"Textbook" example of UART doesn't work on stm32f756zg. HAL_UART_Transmit() returns HAL_BUSY

I want to send a message through uart5 of my nucleo board. I configured UART5 appropriately as per https://wiki.st.com/stm32mcu/wiki/Getting_started_with_UART . Here is main(): ...
David's user avatar
  • 1
0 votes
3 answers
2k views

Sending int16_t or uint32_t data over serial on STM32F103 microcontroller

I designed a device which includes many sensors. These sensors are constantly sending information, every 400 ms, do there are series of data which reach the microcontroller (STM32F103). I want to ...
Mary's user avatar
  • 11
4 votes
1 answer
2k views

STM32 C function "strstr()" not working

I am trying to use an STM32 microcontroller (STM32L010C6T6 to be exact) to parse NMEA sentences from a GPS module over UART. I receive the messages fine, but run into issues when I look for specific ...
Nick's user avatar
  • 337
2 votes
1 answer
448 views

Programming the STM32F446RE with a CH340G module

I would like to know if it is possible to program an STM32F446RE MCU with a CH340G converter. And if it is possible, then how?
TA2ERR's user avatar
  • 99
0 votes
0 answers
1k views

Receiving garbage values in USART

I wrote a code in bare-metal mode and USART communication in Keil on stm32f107. But it keeps sending garbage while I expect it to send me "HI" repeatedly. Here are my steps: Wrote an ...
John's user avatar
  • 19
1 vote
0 answers
366 views

How can I access my microcontroller's clock frequency and make it work at 16 MHz?

I wrote a USART communication code in bare metal mode (On STM32F107). And what I wrote in the "Baud rate" section( to select the baud rate): ...
John's user avatar
  • 19
0 votes
2 answers
782 views

Framing Error in STM32G4 LPUART

I have built a discrete buck charger circuit which is controlled by an STM32G4. The G4 is simultaneously measuring voltages, regulating currents, temperatures and communicates to a BMS via UART. Now I ...
Amigo54's user avatar
  • 143
2 votes
1 answer
622 views

STM32 usart interface sends data but "128" is added to each sent byte

I'm using the newest version of stm32cubemx to config my hardware. I'm using a Waveshare STM32H743 dev board and it's completely healthy and uClinux works(I can easily communicate with it using that ...
Mahyar Shokraeian's user avatar
0 votes
0 answers
655 views

STM32G474 HAL Interrupt problem

I've just started learning STM32. I want to make a simple code that uses UART in interrupt mode. Unfortunately I can't make it work. I want an interruption occur when the microcontroller receives a ...
Tardief's user avatar
  • 77
-1 votes
2 answers
2k views

How does one send data through UART from MCU to your PC without any connections on TX/RX pins?

I have been reading up on UART, and I see it works by connecting TX<->RX and RX<->TX of receiver and transmitter. The example I couldn't wrap my head around though is your MCU being able to TX ...
MKD's user avatar
  • 165
1 vote
1 answer
1k views

NUCLEO-STM32L432KC: How to use UART through USB?

Back with my STM32 adventures(data sheet). This time trying to get UART data through the USB. Essentially I want to be able to print over usb to start printing out variables to further debug code. I ...
Leoc's user avatar
  • 1,421
8 votes
3 answers
20k views

How do you determine which baud rate to choose, its relation with MCU clock and oversampling at RX

1) How do you determine the baud rate that you want for your application while considering the clock of the MCU? Baud rate = number of bits / second. The most ...
xyf's user avatar
  • 345
1 vote
3 answers
2k views

Internal oscillator drift and its effect on UART

I am eager to know whether a 150kHz drift of internal oscilator clock (mentioned in a STM32 MCU operating with 8MHz internal clock) could destroy a UART connection?
Bornak's user avatar
  • 83
0 votes
1 answer
454 views

Cannot initialize LPUART1 in STM32CubeIDE on b-l072z-lrwan1?

I was having a problem about initializing the LPUART1 on b-l072z-lrwan1 using the built-in CubeMX code generation in STM32CubeIDE. The problem was when I started debugging, the code seemed to run ...
copsterr's user avatar
7 votes
4 answers
5k views

RX vs TX operation in Software UART

I am short of 1 UART in my MCU. I needed 4 but so far what I have found suitable is an MCU that has 3 UARTs in it, STM32F103. So the 4th one I will have to implement in SW. Each of my individual ...
alt-rose's user avatar
  • 1,489
1 vote
2 answers
8k views

How to design an STM32 board with UART over a USB connection?

Sorry if this seems a stupid question but I'm designing a custom PCB based on the STM32F303RE microcontroller and am slightly confused as to how the UART should be connected in the hardware in order ...
sophia_ash's user avatar
2 votes
1 answer
524 views

Can I use the same serial1 port to communicate with two modules?

My MCU is STM32L432KC, it has two serial ports 1 and 2. But I’m wondering if I can use the same serial port1 only to communicate with two modules (not on the same Tx & Rx pins but 4 different pins ...
sadhna's user avatar
  • 55
1 vote
2 answers
3k views

Trouble getting USART working on STM32 (stm32f103c8t6)

I started working with with stm32f103c8t6 recently and I was able to set GPIO to input and output, however when I try to set USART it just does not work. I'm trying to write directly to registers, ...
xstmpx's user avatar
  • 155
0 votes
1 answer
350 views

STM32CubeMX/STM32L0 UART Transmit unknown symbols

I am trying to connect UART communication with STM32L053C8-Discovery. But the problem is on terminal I get unknown symbols. My Setup on CubeMX ...
m1row's user avatar
  • 5
0 votes
1 answer
385 views

Is a voltage level shifter necessary?

I am using an STM32F100xx MCU and I want to communicate via UART with a GPS module, specifically the A7 Thinker GPS GPS Module with A7 Thinker from Aliexpress This module, when a 9V battery is used, ...
ElectroPro's user avatar
2 votes
2 answers
1k views

FIFO circular buffer size in over UART

I am trying to implement an UART protocol to make communication between two boards. data are ascii encoded and messages length's are variables. I've chosen to implement a packet in order to "...
Pryda's user avatar
  • 1,281
1 vote
1 answer
94 views

STM32F04xx UART - Implement input rejection for strings longer than 2 bytes

I am trying to implement input validation on the STM32 side. I am hoping to allow a string in the form "x\n" where "x" can be any character. To receive a changing number of bytes I have implemented ...
Tom Eaton's user avatar
1 vote
0 answers
2k views

HC 05 bluetooth module not working with stm32

I'm trying to get a HC-05 bluetooth module working with stm32f103c8t6 module(blue pill). I used this usb to serial module to test each of the aforementioned boards and this Android app to connect to ...
dub-dub's user avatar
  • 21
1 vote
2 answers
5k views

USART interrupt not working as expected [STM32 Nucleo]

could someone explain why i can only receive 13 chars with USART interrupt? I use '\n' to detect the end of string. ...
Into_Embedded's user avatar
5 votes
1 answer
9k views

STM32 HAL UART Transmit DMA problem

After setting up my project for a custom STM32F7 board which includes a FT2232H UART<->USB converter I got multiple problems when sending (and receiving data). The code I use is mostly generated by ...
JaneDoe's user avatar
  • 53
0 votes
1 answer
4k views

How to interface SIM800L to UART on STM32F103

I have problem to interface SIM800L with STM32F103. I just read SIM800L datasheet that UART logic level is on 2.8 V. But the STM32F103,can be operated in 3.3 V. I connected my TX RX pin directly to my ...
SkyFrotza's user avatar
1 vote
1 answer
2k views

STM32F4 serial RXNE flag

I am trying to receive serial on a stm32f411. I decided to monitor the the RXNE flag to check the serial buffer. I can get the flag to work, however, the issue is that I do not think it is working ...
Verosity's user avatar
4 votes
1 answer
7k views

HAL + DMA + UART = STM32 crash

I'm currently working on a project which involves communication between a STM32F303RE (Nucleo board) and a classic GSM/GPS SIM808 module plus other peripherals. I want to use the DMA + UART of the ...
Rascafr's user avatar
  • 81
1 vote
1 answer
250 views

STM32F072 3.3V on UART with Wi-Fi ESP 8226

I do have STM32F072RB microcontroller which works on 5V but also have output power pins on 3.3V. I do have Wi-Fi module (ESP 8226) that works on 3.3V. I can power it with STM easily but what about ...
Tomek's user avatar
  • 113
2 votes
1 answer
927 views

STM32 handmade USART driver

I designed a new electronic card which has a STM32F4 microcontroller on it. Each peripheral except the Wifi module works. Wifi module is supposed to communicate with the controller via USART channel ...
sanchop22's user avatar
  • 141
0 votes
1 answer
196 views

USART interrupts in hy-ministm32v board

I'm currently doing USART interrupt program and I have kept my code along with this. But the program is not working as an interrupt can anyone suggest me how to fix this?I'm doing a project using the ...
cheeku's user avatar
  • 1
1 vote
3 answers
12k views

STM32F031K6 HAL UART Interrupts problem

I got a new STM32F0 31 K6 nucleo board and I need to make a GSM UART interface on that board. I need to send an AT and receive an OK from the GSM board as a first step.I am able to transmit AT ...
Olivia Christy's user avatar
2 votes
1 answer
3k views

STM32L0 Low power UART-receiver reads the wrong data at high baudrate after MCU waking up

I'm using a STM32L0 MCU for my project. The MCU has a Low-power Timer (LPTIM) for waking the MCU up from Stop-Mode, and a Low-power UART (LPUART) for both waking up the MCU from stop mode and receive/...
BL_'s user avatar
  • 215
1 vote
2 answers
9k views

UART between STM32F4 and an Arduino Uno

I am able to successfully send strings and numbers between two STM32F407VG Discovery boards and between two Arduino Uno boards but I am unable to do it between an STM32F4 and an Arduino Uno. Here is ...
Baroudi Safwen's user avatar
0 votes
2 answers
5k views

How do I use both usart1 and usart2 together in stm32f103

How can I use both usart1 (PA.09, PA.10) and usart2 (PA.02,PA.03) in a same time? I can send and receive data via Usart1 but when I enable usart2 , no data could not be sent by usart1 and usart2! I ...
Hamid's user avatar
  • 125
3 votes
2 answers
10k views

STM32: UART Interrupt is triggering without any flags getting set

I am using the UART4 module of an STM32F105. I'm using the RXNE ("RX Buffer Not Empty") interrupt to grab data as it comes in. It's working as expected. When the RXNE interrupt is enabled it also ...
bitsmack's user avatar
  • 17k
14 votes
4 answers
48k views

Clearing USART (UART) interrupt flags in an STM32?

I am using an STM32F105 to communicate with a Linx GPS chip using a UART. If I don't use interrupts (if I just poll the RX flag) then it works just fine. But I'm getting unexpected results when ...
bitsmack's user avatar
  • 17k
5 votes
1 answer
4k views

STM32 USART loopback

Is it possible to connect the Rx and Tx pins of the same USART or on two different USARTs on an STM32 discovery board to make a loopback and test the USART?
rxjsisfine's user avatar
2 votes
2 answers
2k views

Wifi Module over UART with STM32 mcu

I am trying to integrate an off the shelf wifi module with STM32f2 mcu over UART interface. I need to test the board after laying out the board. Is there a way I can test this UART interface before ...
Elsa Adams's user avatar