Post Go back to editing

Use PSRAM to do audio delay

Category: Software
Product Number: ADSP-21565
Software Version: CCES 2.10.0

Hi,

I send a new post here about how to use PSRAM to do audio delay.

The PSRAM use SPI or QPI to read and write. It's a waste to wait all the time until read and write operation completed, especially when there are lots of datas.

So we need a mechanism that first set read or write command and address, and then the datas are automatically transferred by DMA.

We can do some other tasks while datas transferring. After the DMA callback occured, We can come back to deal with the datas.

Let's talk about it in two cases and assume we have 4 channels audio delay.

1. Write operation.

We need to send command, address and datas.

I think we can use listdescriptor DMA mode and set 4 lists chained one by one to do it, which is relatively easy to be achieved.

2. Read operation.

We need to send command, address and wait several cycles, then we can get datas.

I don't know how to use DMA in this case.

I find there is a memory mapped mode, which is good to read datas. However it's sad that we can't write datas in this mode.

It's there any other method to do the read operation?

Thanks for your help!

  • Hi Foster,

    Please find the attached flash read-back example project for ADSP21569. In this project, a set of data has been written to flash memory, then read from the memory and verified in SPI DMA mode. This project was tested on the EV-21569-SOM with the EV-SOMCRR-EZKIT.

    Kindly use this as a reference for your application.

    Best Regards,
    Santhakumari.K

    Flash_Read_Back_21569.zip

  • Hi santha,

    Thanks for your reply!

    The project you give is not suitable in my case.

    In PSRAM write and read operation, we don't need to check busy bit, so this is not a problem.

    What matters most is in read operation. When reading datas, first we need to send read command and address, then wait 6 clocks until datas are prepared, the 6 clocks is depend on different command but it is fixed. After wait 6 clocks, we can read the datas back.

    In your project, to achieve a read operation, first we need to wait DMA write command and address, and send DMA read operation after write DMA completed, it's same as core write mode. it's also hard to control the 6 clocks waiting time.

    I find STIG command in OSPI maybe can do this job, but I don't know how to set as DMA mode and chained multiple commands together.

    Please help me to check it.

    Thanks!

  • Hi Foster,

    Please refer example projects for OSPI in EV-2156x_EZ-KIT Board Support Package. These examples might be helpful for you to understand how to configure both OPSI STIG mode and Direct Access mode.

    You can download and install the "EV-2156x_EZ-KIT-Rel3.0.0" board support package from the link below:
    download.analog.com/.../ADI_EV-2156x_EZ-KIT-Rel3.0.0.exe

    After successful installation the example projects for OPSI can be found in the following path:
    <installation path>:\Analog Devices\EV-2156x_EZ-KIT-Rel3.0.0\EV-2156x_EZ-KIT\Examples\drivers\ospi

    We request you to use this as a reference and modify your code accordingly.

    Best Regards,
    Santhakumari.K