How to increment STM32 DMA destination address by custom step size
Hi,
I am using the STM32U575.
In my application, I have to transfer ADC readings to a destination buffer. I have set the DMA source address to the ADC data register (16-bit), and the destination address to a memory buffer start address. The data width is 16-bits or half word, as per the STM32 size definitions.
My requirement is that I need to fill the ADC 1024 samples into the memory and after receiving these, transfer them to another buffer, that is connected to a UART, to be transmitted out.
However, I need to increment the DMA destination buffer address by 32 bits, after each sample from the ADC, meaning, leave alternate half words empty.
The data would look like this in the memory buffer:
ADDR 0: fill with sample 1 (16 bits) - increment DMA destination address by one word (32-bits)
ADDR 2: empty - 16- bits
ADDR4: fill with sample 2 (16 bits) - increment DMA destination address by one word (32-bits)
ADDR6: empty - 16 bits
........
and so on till the 1024th location.
But in the DMA settings, the address increment value options do not have such a choice.
Is there any way to achieve this?
Any ideas are welcome .. :)
