This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Inter-connexion of DSPs with MCUs (arm)

Hello everyone,

I'm currently looking at a fast communication protocol to work with between a DSP (5515) and an ARM M3 in real time.

The 5515 will process an audio buffer and the ARM getting the processed buffer from it.

I am aware of DMA transfers but It would work with an external memory only or internal peripherals right ?

I guess the only way is to use I2C protocol between the two chip and use DMA for internal memory access.

What about using the same external memory between two chip? Is I2C fast enough for audio transfers?

I'm interested in having your point of view

Many thanks !

silvere

  • Hi,

    What is your audio sampling rate and data rate to transfer?

    Normally, I2S is for audio not I2C. I2C only goes up to 400K bps or less.

    You may use dual port memory between 5515 and M3.

    Regards,

    Hyun

  • The audio sampling rate is 48k and the data rate transfer would be the maximum possible to avoid delays.

    The M3 will send a buffer to process to the DSP which then send it back. The buffer size is around 64 samples. There is no audio interconnexion involved.

    Just an array of data. no I2S is needed at all. 

    Apparently there is no EHPI interface on the 5515 so what would be the best equivalent ?

    I can't find anything this dual port that you mentioned.

    many thanks

    Silvere

  • Silvere Letellier said:
    The audio sampling rate is 48k and the data rate transfer would be the maximum possible to avoid delays.

    The M3 will send a buffer to process to the DSP which then send it back. The buffer size is around 64 samples.

    Do the math: I2C at 400 kHz can only send 1 channel of 8-bit data at 48 kHz sample rate, and there would only be 4% of the bandwidth or less to spare for blocking into 64 sample chunks. There's no room to transfer any faster. I assume that your audio samples are at least 16-bit, if not 24-bit, so I2C is clearly out of the question. Not only can it not handle the raw data rate, but there is overhead in I2C for addressing which would take more than the 4% bandwidth remaining. You would need to drop below 8 bit quantization to work with I2C.

    There is no audio interconnexion involved.

    I suppose what you mean here is that there is no analog connection? If you send audio samples as data between processors, then that's an audio interconnection by definition.

    Just an array of data. no I2S is needed at all.

    I do not understand. First you say that you're considering I2C, then you say that I2S is not needed at all. Are you aware that I2S is basically a serial connection that is like I2C but faster? I2S actually avoids the addressing overhead of I2C because audio sample data is assumed. In other words, you should reconsider I2S as an option.

    I can't find anything this dual port that you mentioned.

    Most memory can only be connected to one processor. You have two, and even though one is a DSP and the other is a CPU, they still cannot both talk to the same memory without getting in each other's way. Dual port memory is designed specifically for two accesses, each with its own address and data. Thus, if you decide that external memory is better than I2S, you will need dual port memory.

  • I2C is too slow. Definitely. 

    I was saying that there is no audio data involved because the output of the DSP is encoded and don't look anything like audio data.

    On top of that, the I2S transfer speed is defined by the serializer to keep a sync between peripherals and does not allow much parameters. 

    Well in the end, my researches lead me to the SPI interconnexion as it is derived from the CPU clock! And the pre-scaler of the SPI clock can be 1.

    Dual port RAM looks like the fastest access but is power consuming...

    Thanks for the help

  • Yes, SPI is probably your best choice.

    I2S might require a constant data rate, and your encoding seems like it might have a variable bit rate. Of course, if your data rate is constant then it really doesn't matter whether it's "audio" data or not.

    If Dual Port RAM is too hungry, try looking into FIFO memory with separate input and output addressing and data lines (i.e. also dual port).