External SPI delay using SRAM for dual channel issue ( not stereo )
Hello,
I have an issue with external SRAM with ADAU1452 when I want to apply different delay value between channel 1 and channel2. ( Internal memory is already full with filters and processing ).
The topic is: We apply two differents External delay modules on SigmaStudio schematic. Each module have one channel input and one channel output. FS is 48khz. The SRAM has capacity of 20Mhz ( 1Mbit ).
The problem is : Channel 2 is overlaping the channel1 memory area. It seems the SRAM is not splitted correctly and the channel 1 & 2 share the same memory space.
When I place only ONE External Delay module on the schematic with two channels (stereo mode), it is working perfectly, the same delay is applied and each channel are separated. ( no noise, no glitch )
I have read all topic on the forum, understanding the bandwith capacity on SPI (thats seems ok), we have a good PCB without reflexion, we need a custom delay per channel ( 0 -> 300ms) and we need 24bit of data minimum ( 16 bit is not compatible with our design).
My question : What should be the best configuration to split the SRAM between ExternalDelay1 and ExternalDelay2. Is it possible with this library (actually SPI RAM Delay V1.01), or can we change a specific parameters to do the job ?
Thanks you in advance for your support.
Best regards
Sebastien.
Audio Signal Processors
adau1452
software
SigmaStudio 4.7 build 0 rev1831 4/5/2022
SigmaDSP Audio Processors
Hello,
To complete my previous email, I catched some scope view to have a better understanding of my issue.
My setup is a DSP with a start pulse at 96khz. I down-sampled the SPI external delay divided by 2 to work at 48khz. We placed two External SPI delay, one per channel :
One delay is set at 5000 samples and the second at 200 samples. Theses values are more simple to calculate address memories.
The scope view below show the LR (means Start pulse of DSP), CS, SCLK and MOSI of SPI interface. I have pushed no audio on this view. The external delay module is working at 48khz and we have two LRCLK for one SPI cycle. The Long CS high state close a sampling cycle. I confirme to have checked with only one channel ( one External delay module ), we have no SPI activities during the second cycle of LRCLK.
The behaviour is located on the address of write and read instruction.
We can see two "write" access and two "read" access during a cycle of one sample. On the bottom, the address decoded.
- The first channel write sample at address 0xB528
- The second channel write sample at address 0xB528. It is a problem because that overwrite the sample of first channel written just before.
- The read of first channel is 0xB208. We can calculate a delta address of 800 bytes => 200 samples ( 32bits / samples) that is OK ( we have 200 sample delay on channel 1 )
- The read of second channel is 0x6708. We can calculate a delta address of 20000 bytes => 5000 samples, That is OK. ( we have 5000 sample delay on channel 2)
The problem we have clearly an overlap between Channel 1 and 2. The Write address is not correct. The read address is depending of write address + sample offset.
To finish, I confirm the Channel 1 audio sample is correctly written on SPI slot channel 1, the same for channel 2. On the read side, we can hear the channel 2 duplicated on both channel, side effect of audio sample written at the same address.
I hope have reporteted lot of information. Please have a look on this issue.
Thank you in advance
Best regards
Sebastien
Hello Sebastien,
You have done a great job of analyzing this and I think you have found a bug. I am guessing that the compiler does not handle the multiple instances correctly. I know that is obvious... I have been trying to figure out a good workaround but so far no flash of insight.
It might be good to see your program. If you can simplify it to take out your more proprietary stuff and still see the issue that would be helpful. But, if not then send me a friend request and send it to me in a PM.
Harish might also have some ideas here....
Dave T
Hello Dave,
Thank your your answer. Yes we can share the project file.
I try to send to you a Friends request but it seems not working :
That Was Unexpected
We apologize, but an unexpected issue prevented the page you requested from being available. We've logged the issue so the site administrator can resolve the problem.
Please keep me informed, i can share by email or other.
Best regards
Sébastien
Sorry for the size of the font, i can't change it...
Please log in to reply.


