UART Communication Sync Issues Between STM32 and nRF5340DK
Hello everyone,
I'm working on a project that involves UART communication between an STM32f429 and an nRF5340DK, with the nRF5340 acting as the UART transmitter and the STM32 as the receiver. However, I've been facing issues where the data received on the STM32 side appears to be out of sync, even though I’ve ensured that the baud rate and configuration match between both devices. Here are the details and what I've checked so far:
Hardware Setup
- Microcontrollers: nRF5340DK (Nordic Semiconductor) and STM32 (STMicroelectronics).
- Connections: Direct UART lines (TX from nRF5340 to RX on STM32, and RX from nRF5340 to TX on STM32 for debugging, if needed).
- UART Configuration:
- Baud Rate: 115200
- Data Bits: 8
- Stop Bits: 1
- Parity: None
- Flow Control: Disabled (enabled it to see if it makes any diffrence but no diffrence observed)
The STM32 receives data from the nRF5340DK, but the received data is frequently out of sync. Sometimes, it appears that characters are missing, or the data shifts unpredictably, leading to incorrect data interpretation on the STM32 side.
Steps I’ve Taken So Far
Double-Checked Baud Rate and Configurations: Both devices are set to the exact same UART configuration as listed above, including disabling flow control.
Examined Signal Integrity: I've checked the UART lines for noise or interference and verified that the wiring is secure, i noticed that logic high from the nordic board is around 2V but i don't think it's affecting the reading as the data is indeed received but just out of sync .
Buffer Handling on STM32: Ensured that the STM32 is ready to receive data and not missing characters due to buffer overruns.
Since the typical parameters (baud rate, parity, data bits, stop bits) all match,I'm note sure how to continue .
Has anyone experienced similar sync issues when connecting two microcontrollers via UART? I’d appreciate any advice on additional troubleshooting steps or alternative solutions that have worked for you.
Thanks in advance
