for a new project I have to transfer data from a SD card to a serial line SDI (1 GPIO line). The data has to be synchronized with a 20 Mhz clock CK.
At certain times , controlled by an external encoder signal, a data block of 434 bits has to be transferred synchronous with the 20Mhz clock. The time between 2 data blocks is minimum 70uS.
Till now I have configured timers to make a 20Mhz clock, to read the encoder clock and to generate the start trigger with the 20Mhz clock for the 434 bits transfer.
In total I need 2 SDI lines. Each line needs different data (same format) and is shifted in time. (the second SDI line starts a few mS later compared to the first SDI line).
Now I'm struggling with how I have to transfer the data from the SD card to the serial line.
The format of the data inside the file on the SD card I can manipulate to the format best for this transfer.
Does someone has an idea how I can make this (DMA) data transfer from SD card to serial line?