Post Go back to editing

How to use SPI1 in DMA mode to readback from flash?

Category: Software
Product Number: ADSP-21565

Hi,

In my project, a SPI SRAM is connected to SPI1, I need to read and write the SRAM while 21565 is running.

I don't want to use CPU to process the read and write operation, so I need DMA mode in SPI1.

The read operation is like below.
instruction >> address >> dummy clocks >> read data

We need first write instruction and address bytes, and wait several dummy clocks, then datas can be read out.

The SRAM is work in QSPI mode, so we need to change the direction of 4 data lines after dummy clocks.
I wonder if this operation can be done by DMA.

In the 2156x BSP DMA example, there's only read or write operation at one direction.

Can DMA change the direction which achieve write, wait and read operation?

Please give me an example so that I can start my work.

Thanks!



I forget to say that I need to use QSPI mode so that direction must be changed after dummy clocks.
[edited by: Foster at 1:30 AM (GMT -5) on 26 Dec 2024]