Skip to main content
LOnGr.1
Associate III
August 10, 2023
Question

USART1 working but USART2 and USART3 no

  • August 10, 2023
  • 1 reply
  • 1073 views

Hi!

I am working on a project where multiple sensors are connected to the stm32f4 transmistting data on a very high baud rate and then the received data is transmitted through USB VCP. For these matters I used DMA with USART1, USART2 and USART3 and implemented usb cdc. I created a circular buffer for each USART to receive the data and then send it via usb. Each time an idle line occurs, I calculate the head and length of the received packet and transmit it (all the calculations are inside the interruption).The thing is that I wanted to test each UART apart, and UART1 is working perfectly (I am receiving the data I want continiously ) but when I do exactly the same thing on UART2, I receive data once (approx 2000caracters) and then it stops. What can be the origin of such a problem? I checked the code multiple times and all the configurations are good. Maybe I am forgetting something

This topic has been closed for replies.

1 reply

TDK
August 10, 2023

Check for an overrun condition on the ones that only work once. Check for other error conditions in either the DMA or UART registers.

"If you feel a post has answered your question, please click ""Accept as Solution""."