All Questions
266 questions
1
vote
4
answers
3k
views
UART not sending correct data in STM32
I have to send data by UART1 from my STM32F429. The problem is that the data is not sent correctly.
I debugged and I got this.
For testing I want to send ...
1
vote
1
answer
2k
views
STM32 UART with DMA
I'm working on firmware for an STM32F103 which is communicating over RS232 at 9600 baud. I need to transmit and receive the data by using UART_DMA method. For transmitting the data, the DMA register ...
1
vote
2
answers
598
views
What is the STM32F103 USART oversampling value?
There is the stm32f10x_usart.c file in the STM32F10x SPL. This file file has next strings
...
0
votes
1
answer
582
views
How to configure CDC (VPC) on the STM32 Nucleo F401RE board?
I am trying to establish communication between my host machine (running Ubuntu 22.04) and the STM32 Nucleo F401RE board. I only need to transmit data from the board to the host computer (only single ...
1
vote
1
answer
647
views
Fix clock settings on STM32F105 with 25MHz oscillator
Noob here :)
While reverse engineering a CAN bus filter module:
Using existing code from Github: https://github.com/EliasKotlyar/Canfilter
It appears that the clock settings aren't correct because <...
0
votes
0
answers
412
views
stm32 Lora UART communication
I have 2 lora module. I want to use one of them as receiver and the other one as transmitter. I can do this with 2 Arduino uno but I want to use one STM32 board as transmitter and Arduino uno board ...
1
vote
1
answer
201
views
Serial communication in STM32 based boards
I've made a desktop application which interfaces with an Arduino board via serial ports. Now as I have completed my project in theory, I want to make a more professional PCB with a higher clock speed, ...
3
votes
1
answer
521
views
STM32F401 UART noise
I have device with an STM32F401 and a SIM800L. When the SIM800L sends data I have noise (usually 1 byte) received by the STM32 on UART2 connected to the SIM800. If I use FTDI instead of STM32 I never ...
0
votes
0
answers
713
views
Transmit large data through UART OR Ethernet
I followed the AN4666 to read data from GPIOC ports triggered by timer input capture mode and save into a large buffer of uint8 in size of (510000) arrays, all I want to do is to transmit the full ...
-1
votes
1
answer
371
views
How to detect if STM32 is in debug mode? (to select between UART and SWCLK pin)
We have a project with STM32F051 and now we need to use UART2 and the only unused pins are the pins 37 (SWCLK) and 38. I know there is another post with this topic.
STM32 Using SWCLK and USART on the ...
0
votes
0
answers
1k
views
Which STM32 supports USART IDLE line detection?
I have a project with an STM32F302R8 realizing a communication protocol via a USART based on IDLE line detection.
I used HAL_UARTEx_ReceiveToIdle_DMA located in ...
2
votes
3
answers
2k
views
How do I program the STM32F401CCU6?
I am transitioning from Arduino to STM32 development. I just purchased an STM32F401CCU6 board and I cannot get it recognized by my computer. I am running Ubuntu 22.04. I have tried searching ...
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 ...
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 ...
2
votes
0
answers
225
views
Which instructions do I use to be able to use UART directly on my STM32F107 microcontroller?
I've tried to figure this out on my own but after almost a week I'm still at more or less the same place where I started. So, I have an STM32F107 microcontroller on a board, which is linked to another ...
1
vote
1
answer
1k
views
STM32F407VET6 - How can I handle frame and noise errors in UART?
I'm receiving data in UART Rx with DMA and I need to make it immune to disconnections. Now, sometimes I can recover the communication after a disconnection, but I need to recover it always.
Using the ...
0
votes
2
answers
548
views
Two separate PCBs and common ground for UART communication [closed]
I have two separate PCBs. Both are powered by separate batteries. I want to communicate these two PCBs with UART. In some schematics, only RX and TX are used, while in others connections are made with ...
1
vote
1
answer
1k
views
STM32: USART interrupt triggered with no flags
I am using USART1 on STM32L051 with interrupts for serial communication. I start my program by sending 5 bytes from MCU to PC, which works fine, but then a USART interrupt gets triggered with only TXE ...
1
vote
2
answers
1k
views
Ebyte E32 RF module configuration problem
I designed a PCB with an STM32G474RET6. I used an Ebyte E32-433T30S module. I searched on web and read the datasheet. So, I got some info:
This Ebyte module needs to be configured before transmitting/...
2
votes
1
answer
163
views
USART stop bit not pulled high during nRF update
I am using an STM32L4 chip that sends an update to the nRF52832 on a ublox module over USART. I assume the nordic chip is in the bootloader during the update.
We get a UART error: 4 and when we ...
0
votes
0
answers
307
views
How to program a Nucleo board (L053R8) using UART?
I went through all possible data sheets I could find did all the required things but my Nucleo still won’t be programmed with uart.
I have put boot0 on VDD pin next to it. For confirmation I also put ...
0
votes
2
answers
1k
views
stm32 reading from SPI and forwarding to USART
I'm reading samples at a fairly high bitrate (820kbps) from an external ADC over SPI. I need to add a CRC byte and then forward each sample to USART.
As a consequence of my inexperience, within the ...
2
votes
0
answers
597
views
UART communication problem between Raspberry Pi 4 and STM32F767ZI
I'm trying to debug a problem with the UART communication between the raspberry pi 4 and an STM32.
Indeed, I try to send the number 1 from the raspberry pi to the stm32 but I can't get the right ...
1
vote
2
answers
145
views
Which struct variable for UART needed to communicate through ST-LINK module for this STM32 board?
Regarding this STM32 board. I want to send character to it by from a terminal program using ST-LINK module and only USB. I can do that by using USB to TTL converter. For instance I enable the pins of ...
1
vote
1
answer
776
views
STM32 USART Does Interrupt Trigger if TXE was set before TXEIE
STM32F746 Disco, STM32CubeIDE 1.7.0, Win 10, CMSIS-only, C language, on registers.
I'm writing a UART transmit driver on interrupts (load data into buffer array, automatically fetch it from there with ...
3
votes
1
answer
1k
views
STM32 UART Blocking Receiver Not Putting Data In Array, Overrun Flag
STM32F746 Disco, UART1 connected to ST-Link, Win 10, STM32CubeIDE, C, no HAL no other libraries other than CMSIS register definitions. Putty on Windows side to send and receive UART messages to/from ...
1
vote
1
answer
3k
views
Print float value over UART with STM32
I am working with an STM32, more specifically an STM32F401RE. I am trying to send some float value over UART by using the printf command.
When I execute the code, ...
1
vote
2
answers
469
views
Can't debug UART communication properly from GPS to STM32
I'm trying to debug my NEO7M GPS-tracker with STM32H7. NEO chip has UART interface so I set up UART and start coding (Keil v5). It's clear but not for me.
What's going on here:
NEO7M is transmitting ...
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?
0
votes
1
answer
732
views
UART printing gibberish to the terminal when the STLink Debugger is not connected
Custom board, not an ST development board.
MCU: STM32G031J6M6 SO8 package. UART RX/TX are Pins 1 and 8 respectively.
Pin 8 is also SWDCLK
Pin 7 is SWDIO and not used except for SWD
NRST is Pin 4 and ...
2
votes
1
answer
1k
views
STM32 ADC & DMA causing infinite loop at startup
I am working with a nucleo-F401RE - I am experimenting with the DMA and ADC. When I try to debug my code it is immediately going into Infinite_Loop
here is my code:
main.c
...
1
vote
2
answers
1k
views
Error rate calculation in UART
I am analyzing the error rate in UART communication. Can anyone tell me how to measure the bit error rate in UART communication?
Is this possible to measure the error rate by Pico-Scope or by using ...
1
vote
0
answers
819
views
STM32 Using SWCLK and USART on the same PCB
I designed a custom PCB which uses STM32F030C8 chip. I was wondering if it's possible to use debugging capabilities as well as UART communication on the same pin (PA14). It's not possible to attach ...
0
votes
0
answers
298
views
Writing a swap buffer UART for STM32
I'm having a logical problem which I can't figure out. I would like to write a safe in terms of synchronization of UART on STM32F103.
I have two buffers that I swap between them in case interrupt has ...
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 ...
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):
...
1
vote
1
answer
315
views
Y-modem protocol frame count
When I use the Y-modem protocol on stm32 board, I’m faced with data count bytes. There are two bytes on the frame, one byte is data count another is 0xFF-dataCount.
...
1
vote
1
answer
7k
views
STM32 UART interrupt with callback not working
I am trying to make a small project with an STM32 which uses serial commands to control the rotation direction of a motor. I used UART interrupts and callbacks to try to achieve that.
I am using an ...
3
votes
3
answers
3k
views
Good idea to use UART in half-duplex mode when using RS485 transceiver?
Most 2-wire RS485 implementations I have seen use both UART RX and TX pins which works of course. And I have done so.
But I was wondering whether using UART in half-duplex mode is a good alternative ...
1
vote
1
answer
2k
views
HAL UART DMA NDTR Register
I am working with the stm32f4xx for the using UART DMA Tx-Rx operations.
I have this line firstly:
...
0
votes
3
answers
4k
views
2
votes
2
answers
5k
views
Determining how many bytes DMA receives with HAL_UART_Receive_DMA
How can I determine how many bytes to receive with DMA?
I use the this function:
HAL_UART_Receive_DMA(&huart2, (uint8_t*)rs485RxDMABuffer, 100)
If I don't ...
1
vote
3
answers
5k
views
HAL_UART_Transmit_DMA function sending wrong data
I am trying to use UART with DMA,
before the DMA I tried polling method with while(HAL_UART_Transmit(&huart2, (uint8_t *)rs485TxBuffer, 17, 100) != HAL_OK); ...
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 ...
0
votes
0
answers
519
views
UART Blocking Mode and Non-Blocking Mode
I want to using RS485 communication between two or more device using stm32 + tranceivers, I need to request-response type communication so RS485 bus will have many data. Which one would make sense to ...
-1
votes
1
answer
615
views
RS485 receiving data corruption
This was my first topic, RS485 Tutorial Issue. I referenced because of the schematics.
I solved the problem in above topic, I forgot to pin settings for DE and RE pins.
I have a different problem now.
...
0
votes
1
answer
2k
views
RS485 Tutorial Issue
I have two device ( ISL83485 + STM32), and they connected on RS485 line.
I want to send some UART signal to RS485 line with a tranceiver. I am using ISL83485 tranceiver for this purpose, I am using ...
0
votes
2
answers
506
views
Trying to find and bridge USART pins from the manual of an STM32 board
I am trying to solve an issue regarding a firmware with this 64-bit Nucleo Board.
I have the hex file and can see the ready source code but when I upload the firmware I am not able to communicate ...
0
votes
0
answers
1k
views
STM32 uart interrupt not firing
After having a UART echo working on my nucleo F446ze, I am trying to get UART interrupts working.
I thought all I had to do is :
set the priority for the UART3 interrupt
enable the USART3_IRQn
...
1
vote
2
answers
805
views
Serial port from PC not reaching the MCU
I'm trying to send some data from the PC to my STM32L432KC Nucleo board using UART.
Transmitting data to the PC works just fine, I'm receiving data through the STLink Virtual COM Port which I can see ...