1

When I use UART in DMA mode with CubeMX generating code. I read the source code of HAL lib and I can't find any __HAL_UART_ENABLE_IT that can enable UART interrupt in the process of UART DMA mode. So I guess UART interrupt is no use and try disabling UART interrupt by // HAL_NVIC_EnableIRQ(USART1_IRQn);

After that I can't use UART DMA mode correctly. I can't both transmit and receive data. My device is STM32f103VET6.

My question is what role UART interrupt plays in UART DMA mode and how it affects this process?

mkayaalp
  • 2,631
  • 10
  • 17
yaya A
  • 21
  • 2
  • I find *Idle Detection* interrupt quite useful for detecting the end of data packets when using DMA for USART reception. Some series support a similar Modbus interrupt. – Tagli Apr 11 '21 at 07:59
  • try to be more specific - what you want to archive, read the documentation etc etc. – 0___________ Apr 11 '21 at 10:15
  • *"what role UART interrupt plays in UART DMA mode"* -- Your question seems to assume that there is only one reason why an interrupt could be generated, which simply is not true. There's probably a half-dozen (or more) reasons why a UART could generate an interrupt. See https://stackoverflow.com/questions/25318145/dma-vs-interrupt-driven-i-o/38165400#38165400 – sawdust Apr 12 '21 at 04:41

0 Answers0