Complete the code to start the memory-to-peripheral DMA transfer.
DMA_StartTransfer([1]);The function DMA_StartTransfer requires the DMA channel identifier to start the transfer.
Complete the code to configure the DMA source address for memory-to-peripheral transfer.
DMA_SetSourceAddress([1], buffer);The source address must be set on the DMA channel used for the transfer, here DMA_Channel1.
Fix the error in setting the peripheral destination address for DMA transfer.
DMA_SetDestinationAddress([1], &PERIPHERAL_REG);The peripheral destination address must be set on the same DMA channel used for the transfer, which is DMA_Channel1.
Fill both blanks to configure the DMA transfer size and enable the transfer complete interrupt.
DMA_SetTransferSize([1], 256); DMA_EnableInterrupt([2], TRANSFER_COMPLETE);
Both functions must use the same DMA channel, DMA_Channel1, to configure the transfer size and enable the interrupt.
Fill all three blanks to complete the DMA memory-to-peripheral transfer setup.
DMA_Init([1], buffer, &PERIPHERAL_REG, [2]); DMA_SetMode([3], MEMORY_TO_PERIPHERAL);
The DMA channel used is DMA_Channel1. The transfer size is 256 units. The mode is set on DMA_Channel1.