cancel
Showing results for 
Search instead for 
Did you mean: 

The STM32 HAL library serial port cannot receive and receive at the same time.

Zzhou.1
Associate

The problem appears in the serial port receiving interrupt function, the serial port is locked, but the latter sentence has been unlocked, but why is it still locked?

I have consulted the manual of the STM32HAL library. The manual says that the serial port is dual-locked for sending and receiving data, which makes it impossible to send and receive data through the serial port at the same time. Friends, how should I solve this problem so that the serial port of the HAL library can send and receive data at the same time 0693W000004GSWyQAO.png

2 REPLIES 2
TDK
Guru

There's no problem here. An interrupt cannot pre-empt itself, so it'll be unlocked the next time the interrupt runs.

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

If you find the HAL UART code to be bloated and dysfunctional you can always replace it..

Here it just locks ownership while multiple related values need to be changed together

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