Can I detect when the DMA channel on the Cortex M3 goes into standby?

I just took a project developing C code for the STM32 Cortex M3 microcontroller.

The problem that I immediately encounter is that I have a free DMA channel that transmits data between two USARTs, but sometimes data from another source must be sent to the USART destination.

Is there a way to detect when the DMA is busy with data transfer or inaction, or is there any interruption caused when the transfer is completed.

Thanks so much for any answers,

Dave

+3
source share
2 answers

Here is what I do to check if the DMA operation is completed:

DMA_Cmd(DMA2_Channel5, ENABLE); // start
while (!DMA_GetFlagStatus(DMA2_FLAG_TC5)); // wait to finish
DMA_ClearFlag(DMA2_FLAG_TC5); // clear flag (needed?)
+2
source

DMA , . - "STM32 Cortex-M3" , , ST.

DMA STM32 Stanadard Peripheral Library. , DMA, DMA USART. , , , . , , .

+3

All Articles