2025-03-18 5:10 AM - edited 2025-03-18 5:10 AM
Hello,
I am using STM32F407 Transmitting some data over UART and Receiving the same data with another in INT on the MCU.
The problem is that the receiving side gets only the first byte even when switching sides the receiving side still receives only the first byte.
I think that the HAL stops receiving data on all UARTS while transmitting.
2025-03-18 5:51 AM
Show your code.
If you want to receive UART data while also sending, you will need to use IT or DMA functions to receive.
2025-03-18 12:50 PM
Show the relevant code snippets. Do error checking for all function calls.
hth
KnarfB
2025-03-18 1:12 PM
@Omar-AbdulQadir wrote:I think that the HAL stops receiving data on all UARTS while transmitting.
As the others have said, show code which demonstrates this.
See: How to insert source code and How to write your question to maximize your chances to find a solution.
You understand that the HAL provides both blocking ("synchronous") and non-blocking ("asynchronous") methods?
As @TDK said, you will need to use the non-blocking methods (interrupts, DMA) to do both transmitting and receiving at the same time.