2022-07-18 05:13 AM
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
Solved! Go to Solution.
2022-07-18 06:00 AM
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
2022-07-18 06:00 AM
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
2022-07-18 07:05 AM
Thanks @Nikita91 I got the answer.