AnsweredAssumed Answered

There is a wrong comment in stm32f1xx_hal_dma.c

Question asked by went.cao on Apr 5, 2017
Latest reply on Apr 5, 2017 by Khouloud G

static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)

{

/* Configure DMA Channel data length */

hdma->Instance->CNDTR = DataLength;

/* Peripheral to Memory */

if((hdma->Init.Direction) == DMA_MEMORY_TO_PERIPH)

{

/* Configure DMA Channel destination address */

hdma->Instance->CPAR = DstAddress;

/* Configure DMA Channel source address */

hdma->Instance->CMAR = SrcAddress;

}

/* Memory to Peripheral */

else

{

/* Configure DMA Channel source address */

hdma->Instance->CPAR = SrcAddress;

/* Configure DMA Channel destination address */

hdma->Instance->CMAR = DstAddress;

}

}

Outcomes