I've got a problem with sending data over UART using HAL_UART_Transmit_DMA function "being inside" HAL_UARTEx_RxEventCallback function more then one time (actually it doesn't matter what the transmission function I use - DMA, IT or just blocking mode, the transmission is executed just once). Meanwhile in the infinite function while(1) I can use HAL_UART_Transmit_DMA repeatedly, one by one. In the USART settings interruptions are enabled, global (including DMA) interruptions are enabled. The question is how can I transmit data over UART from HAL_UARTEx_RxEventCallback more the one time? Maybe some of you have faced the same problem and solved it. Thanks!
By the way, I use STM32F401.
Firstly I started to seek the solution on the Internet. So I found that some guys had issues with the driver stm32f4xx_hal_uart and adding the string huart->gState = HAL_UART_STATE_READY in the end of the function UART_DMA_TransmitCplt. I thougth maybe there's a key, but no. I tried to do it - it didn't work out, after I used different transmission functions I'd written about before. No result, I just made a conclusion that it's not an issue in the DMA fuctions. It seems it's something generally related to USART functions.