Skip to main content
Shakthi
Associate II
July 18, 2022
Solved

PINC MINC in DMA

I'm using Timer 2 to capture PWM input. The configurations are made to capture the period and duty in both CCR1 and CCR2 registers.

I have planned to use DMA, to store the values of CCR1 and CCR2 into memory using with a same channel of TIMER2(CHANNEL 3 of TIMER2). The DMA is configured in circular mode with SNDTR to 2. 

I see we have PINC and MINC bits , which can be used to increment both Peripheral (in DMA_SPAR) and memory address(DMA_SM0AR) automatically after each DMA requests.

But, I 'm unable to see whether the configurations (initially configured addresses) in DMA_SPAR, and DMA_SM0AR will be back to initial value once SNDTR becomes zero.

Can someone please help me finding the answer

This topic has been closed for replies.
Nikita91
Nikita91Best answer
Lead II
July 18, 2022

The addresses in MA_SPAR, and DMA_SM0AR will never change. They are the addresses of the start of the data areas. When the DMA is running, the current PAR and MAR addresses are in internal counters. These internal counters are re-initialized after NDTR becomes 0 then get its initial value again

2 replies

Nikita91
Nikita91Best answer
Lead II
July 18, 2022

The addresses in MA_SPAR, and DMA_SM0AR will never change. They are the addresses of the start of the data areas. When the DMA is running, the current PAR and MAR addresses are in internal counters. These internal counters are re-initialized after NDTR becomes 0 then get its initial value again

Shakthi
ShakthiAuthor
Associate II
July 18, 2022

Thanks @Nikita91​  I got the answer.