Closed yetkieu846 closed 6 years ago
Hi, I'd recommend to check and verify the followings:
Yes, thank for your recommend. I have found the issue. "Is the UART IDLE interrupt enabled?" that right. i used __HAL_UART_ENABLE_IT(&huart1, UART_IT_IDLE); and it work perfectly
I'm glad that you found the issue and managed to get it work.
Hi,
It's totally safe to remove timeout and process data immendiately after IDLE interrupt happend? I don't really need timeout, I need to process the data as fast as I can. It would be still better than using byte-to-byte interrupt method for data processing.
It depends on your application. If you receive data from your peripheral/device which is guaranteed that there is not a single delay between characters in a burst/message, then you can rely simply on the IDLE interrupt. If not, then this approach is not safe.
Regarding the "byte-to-byte" interrupt question: it again depends on your application. If you can process data in chunks as well (and you don't have to wait until you receive each byte of the incoming message) then maybe it is a better approach. If not, then not. But in general, using DMA will reduce your overall CPU utilization.
I am using STM32F4 disco Kit. I am trying your code but DMA timeout Event not run. Interrupt only call when Buffer is full. What is the issues?