cancel
Showing results for 
Search instead for 
Did you mean: 

DMA questions

Lukasz rcc
Associate II
Posted on October 07, 2017 at 14:12

Hi,

I'm learning about stm32 MCU handling. stm32f0-discovery platform with stm32f072rb MCU.

I have a questions about DMA.

1. How to modify transfer direction? I try to modify DIR bit in CCMR1, but setting is rejected.

2. I have only one DMA1_Channel1->CMAR register. How to achieve memory to memory transfer. I should have two different memory address, source and target.

1 REPLY 1
Posted on October 07, 2017 at 15:11

1. There is no CCMR1 register in DMA, you probably meant CCR1? What does 'rejected' mean there? You can't change some (if not all) of DMA_CCRx bits once DMA_CCRx.EN is set.

2. There are two address registers, DMA_CPARx and DMA_CMARx, and their role as source-pointer and destination-pointer swaps with the DMA_CCRx.DIR bit. Don't be misled by the 'peripheral address' name - it's simply an address register and is not aware of whether it points into a peripheral or into other resources, (memories). (This gets different in the more complex DMA module in 'F2/'F4/'F7).

JW