cancel
Showing results for 
Search instead for 
Did you mean: 

Blue Pill UART communication problem: bytes not received in loopback test

Navya
Associate

We are interfacing a Chafon MU910-M UHF RFID reader module with an STM32F103C8T6 (Blue Pill) board using UART communication. During loopback testing, we observed that individual UART ports are functional and can transmit single byte, but when attempting to transmit an entire byte/frame, the transmitted data is not received back.

We have verified the following:

  • External connections are correct (Tx ↔ Rx, common GND).

  • Code implementation is correct based on STM32 HAL/LL libraries.

  • UART peripheral initialization works when tested with single-byte transmission.

However, the issue arises when transmitting multiple bytes (frames), where the data is either not looped back correctly or is lost.

Have anyone faced this kind of issues? We are looking for guidance on the next debugging steps, specifically why the UART works for single-bit/byte transmission but fails for multi-byte frames during loopback testing.

1 ACCEPTED SOLUTION

Accepted Solutions
gbm
Principal

It's impossible to help you without seeing the code, My wild guess is you are trying to use blocking calls UART_Transmit and UART_Receive for sending and receiving multiple characters. That will not work.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

View solution in original post

2 REPLIES 2
gbm
Principal

It's impossible to help you without seeing the code, My wild guess is you are trying to use blocking calls UART_Transmit and UART_Receive for sending and receiving multiple characters. That will not work.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Andrew Neil
Super User

Note that the Blue Pill is not an ST product, and probably does not have a genuine STM23.

 


@Navya wrote:

 individual UART ports are functional and can transmit single bits


You mean single bytes ?

 


@Navya wrote:
  • External connections are correct (Tx ↔ Rx, common GND).

  • Code implementation is correct based on STM32 HAL/LL libraries.

  • UART peripheral initialization works when tested with single-byte transmission.


You need to show your schematics & code for others to check - clearly something is not right!

Some good, clear photos of your setup may also help.

See:

How to write your question to maximize your chances to find a solution

 

As @gbm said, the problem is likely due to use of blocking UART_Transmit and UART_Receive calls ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.