UART2 GPRS Communication Issue – Continuous Interrupts & Random Data
- June 12, 2025
- 3 replies
- 2073 views
Hello,
I'm currently working on an STM32 project using FreeRTOS, and I'm facing an issue with UART2 communication when interfacing with a GPRS module.
Project Setup:
UART3 is used for debugging (connected to a PC terminal) and is functioning correctly.
UART2 is used for communication with a GPRS module.
Both UART2 and the GPRS module operate at 3.3V logic levels.
The firmware uses STM32Cube HAL drivers and FreeRTOS.
What I’ve Verified:
The GPRS module was tested by connecting it directly to a PC using a USB-to-Serial converter, and it responds correctly to AT commands.
I also performed a loopback test on UART2 (connecting TX to RX), and it worked as expected — transmitted data was received correctly.
Issue Faced:
However, when I connect the GPRS module to UART2 (TX to RX, RX to TX, GND to GND), I observe that:
The UART2 interrupt triggers continuously, even when nothing is being sent.
The receive buffer fills with random or garbage data.
As a result, I’m unable to communicate with the GPRS module properly.
Questions:
What could be the cause of continuous UART interrupts with invalid data?
Are there any specific UART configurations or precautions when using external modules under RTOS?
Could this be related to electrical noise, grounding, or missing hardware flow control (RTS/CTS)?
Additional Details:
STM32 MCU:STM32H755ZIT6U
Baud rate: 115200
UART2 is initialized through STM32CubeMX
Please let me know if you need any further details or if there’s a recommended way to debug this kind of issue.
Please look into my project and screenshots and I am using CM7 core.
Looking forward to your support.
