cancel
Showing results for 
Search instead for 
Did you mean: 

PINC MINC in DMA

Shakthi
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Nikita91
Lead II

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

View solution in original post

2 REPLIES 2
Nikita91
Lead II

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
Associate II

Thanks @Nikita91​  I got the answer.