How is IT different from DMA at a hardware level ?
In DMA mode, the DMA block does copying. In normal mode the controller does the copying. So which block does copy in interrupt mode?
In DMA mode, the DMA block does copying. In normal mode the controller does the copying. So which block does copy in interrupt mode?
It becomes much clearer once you look up the implementation of :
HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
both of them can do arbitrary size transfers.
Reading the TRM. RM0316 : page 885 Sec 29.2 :
"Received/transmitted bytes are buffered in reserved SRAM using centralized DMA"
They are basically the same operation using different channels and modes of DMA. If all you care is to perform UART input/output without the processing unit getting involved, either mode (IT or DMA) will do fine.
The use of DMA peripheral mode is to allow peripheral to peripheral transfer and peripheral triggered data transfer without invoking the processing unit.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.