DMA/STM32F103: memory to USART2 TX.
Hi all, I am successfully transferring from a memory location to the data register of USART2 Tx using DMA operation. And the USART2 has been used by the printf() to output to the PC.
What I don't understand is, what moderates the rate at which DMA moves data from memory location to the Tx data register? Obviously, data cannot be moved to Tx data register faster than it can transmit, otherwise there would be overwrite errors. Nor should the data be moved at a much slower speed than the Tx can handle, otherwise time would be wasted.
So what is the mechanism that moves the data to Tx data register at just the right rate? I did not set any Tx transmit complete flags or ISRs to indicate to the DMA the completion of the last transmission out of the Tx data register. Thanks in advance for your help and explanation!
