I have a few questions regarding using the DMA of the stm32f7 board (nucleo F722ZE ).
1) So to get started I'll explain what I'm doing:
I need to read data from 2 GPIO pins (ADC) and will have a clock signal fed to the stm32f7 from the device supplying the data. I plan on letting the clock signal trigger an interrupt timer and whenever the timer is triggered I want the DMA to do a memory to peripheral transfer. The memory will be 2 bits on the GPIO port with the peripheral being a SPI line coupled to a SD card.
2) Accessing the data:
I referred to the arm cortex 7 manual and found the following:
The GPIOC port is mapped to 0x40020800 - 0x40020BFF and the input data registers are set at an offset of 0x14.
So I take the memory mapped base register (0x40020800 and add 0x14 to it) Therefore the source address I supply to the DMA will be 0x40020814?
3) Having the DMA shift out this data.
This might be the larger problem. Once I have the data at the GPIO pins, I'll essentially be receiving it bit for bit and the data is actually 24 bits long, per pin. So in total each gpio pin will receive 24 bit packs of data. Although when the external signal triggers the timer, I'll only have one bit at each of the GPIO's.
Is there any way that the DMA can selectively pull out the data bit by bit, till it has all 24 bits and then send it over the SPI. Using some sort of buffer and burst transfer? Otherwise it seems the DMA can do a minimum of a byte transfer, which will require me to send massive amounts of garbage bits for every bit I transfer.
Finally: To summarize, I'm uncertain about the location of the GPIO data, is the address I put down correct and I'm completely unsure of how to go about having the DMA transfer this data??
Any help will be appreciated!