STM32L053R: DMA incremental address mode
Hi,
I am trying to configure TIM2 timer to trigger DMA every 400 uS and gather data from SPI buffer to local data buffer.
Buffer: uint16_t local_buffer[40];
Now every time timer interrupt occurs, i want DMA to store data from SPI buffer into local_buffer and increment address by 1 byte. This means, the next time interrupt occurs, it will copy data to next location of buffer.
I am able to trigger DMA and also copy data from SPI to local buffer. I have specified transaction size as 1 byte. I am observing that DMA is writing data to same location again and again i.e local_buffer[0].
I have set the MINC flag in DMA_CCR register.
Kindly let me know if there is a way to write to next location of destination buffer on every trigger.
Thanks!
Hardik
#timer #dma-transfer #tim2 #dma #stm32l053