cancel
Showing results for 
Search instead for 
Did you mean: 

UART tx stop when I send messages for a long time

dlee.0
Associate II

I'm using uart fuctions with my board STM32F401RE.

I don't use cts, rts (hardware flow control) and any receiving process.

So I only transmitt some values to PC but I found that when I send a message constantly, suddenly it stop.

I think it's related with tx buffer but I can't find specifically what the problem is.

The code I'm using is generated from cubeMX and I didn't modify anything.

What is the problem?

3 REPLIES 3
Mon2
Senior III

Which routines are you using for the TX function?

What is the baud rate? What is your CPU clock?

If not tested already, try the calls with IRQ support or better yet, the DMA supported routines.

What is the result?

AvaTar
Lead

I suspect an improper error handling. If you dwell too long in the receive interrupt, or another handler, an overflow occurs. Or you get another receive error.

Unless you explitely reset the OV/error flags, you will not get further RX interrupts/characters.

Check errors reported by functions and review peripheral state in debugger to get a better understanding of the failure. ​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..