UART DMA race condition bug
Hi, I want to discuss this problem in UART DMA on STM32F4 boards
I am sorry to upload picture rather than code.
Moreover, my English is not proficient and please understand.
I tested my code under nucleo-f429zi.
-------------------------------------------
First of all, I configured UART3 with DMA option on board.
The below figure is the code I tested

I thought that if I called UART_Receive_DMA function in the code, the data only receive DMA method.
The reason is that UART_Start_Receive_DMA() called by HAL_UART_Receive_DMA() make receiver state (RxState) HAL_UART_STATE_BUSY_RX in line 3259 of second picture.

So when I called HAL_UART_Recevie() which does not use DMA method, HAL_UART_Recevie() cannot receive any data if HAL_UART_Receive_DMA() is already called before HAL_UART_Recevie().
This is because HAL_UART_Recevie() can receive data when receiver state is free (RxState == HAL_UART_STATE_READY) (below figure 1271 line)

So I thought that if user makes the RxState HAL_UART_STATE_READY after calling HAL_UART_Receive_DMA(), HAL_UART_Receive() could work (below figure)

I tested this code and result is weird.
When I give input string "Hello world!!" via serial communication to UART, UART cannot receive first character of the input string.

I think that the problem is HAL_UART_Receive_DMA() and HAL_UART_Receive() only check once receiver state (RxState) and both functions are ready to receive data.
So this code may make race condition between both functions.
I want to hear your opinion about this.
