Shared memory address inconsistency in Echo_DSP sample program

This is a follow up for a previous problem I have posted, and need to find an explanation for. (Is a simplified program available for testing LPDSP32 codec using echoDSP? - #5 by mahaju)

I am trying to see a demonstration of the Echo_DSP sample program. I am running this program by loading the AudioCodecs project in the Arm Cortex in debug mode, while loading the echo.pxr project (RSL10_LPDSP32_Software_Package\RSL10_LPDSP32_3.1.0.144\AudioCodecsDSP\src\codecs\echo) in the LPDSP32 in debug mode using ChessDE. These are the changes I have made to the source code of the AudioCodecs Arm Cortex program:

A) included related preprocessor directives to enable RTT printf() messages

B) in main() function in main.c, changed the following line:
CODEC myCodec = populateCodec(G722_PLC_DSP, Buffer.configuration, CODEC_CONFIGURATION_SIZE);
to
CODEC myCodec = populateCodec(ECHO_DSP, Buffer.configuration, CODEC_CONFIGURATION_SIZE);

in echoDSPInitialise() function in echoDSPCodec.c, I commented the loadDSPMemory() function
// loadDSPMemory(&echo_dsp_Overview);
02-loadDSP disable

Inside dspHandshake() function in baseDSPCodec.c, added the following line after pBaseDSPCodec config = getDSPCodec(codec);

PRINTF("&(config->dspStatus): 0x%x \n", &(config->dspStatus) );

03-printf

If I single step through this program, the printf() function shows the address of (config->dspStatus) as 0x2000051C.

I had assumed that the starting point of the shared memory address for this sample program was at 0x20011800, same as in the Fibonacci sample program. The value shown in printf() seems completely off (I was expecting this to be somewhere inside DSP_DRAM4/5). If I run the echo.prx project in ChessDE in the simulator, single step through the program into the handshake() function, and find the address &(conf->dspStatus), I get a value 0xB868, which seems to be the correct address (given that the starting point for the shared memory location inside echo.prx project has been declared as (DMA:0x0000B800).
04-printf_lpdsp32

I have the following questions.

  1. Did I do everything correctly here, for loading echo_DSP project into LPDSP32 PRAM directly for debugging?

  2. What is the starting point for the shared memory address, and particularly, the address of config → dspStatus? Is this defined in sections.ld in this project?

  3. Is the address for &(config->dspStatus) that I got (0x2000051C) correct? If it is why isn’t this sample program going past the dspHandshake() function?

Hi @mahaju ,
Today I created a new workplace to try this example. using the CMSIS environment as default.

  1. import AudioCodecs project.
  2. import blinky project.
    — First, build and run debug blinky to make sure the board can work properly.
    — Second, build and run debug AudioCodecs. There is no any issue to pass dspHandshake(myCodec);
    — Third, I just change one line to use ECHO_DSP codec.
    CODEC myCodec = populateCodec(ECHO_DSP, Buffer.configuration, CODEC_CONFIGURATION_SIZE);
    ---- build and run debug. ---- STILL NO ANY ISSUE. It can pass dspHandshake(myCodec);

That is all I did for using a new workspace and re-run AudioCodecs project on RSL10 EVB.

Larry

@larry.zhu What about the address of config->dspStatus in Arm Cortex? Is my address value correct?

Hi @mahaju ,
I don’t understand why you commented the loadDSPMemory() function
// loadDSPMemory(&echo_dsp_Overview);
If you commented this, how you can have echo_dsp memory configuration.
#include “echo_dsp.h”
memoryOverview echo_dsp_Overview = {
{echo_dsp_PM_SegmentList, 1},
{echo_dsp_DM_Hi_SegmentList, 1},
{echo_dsp_DM_Lo_SegmentList, 4}
};

Regards,
Larry

@larry.zhu

I said I downloaded the echo.prx file from AudioCodecsDSP in debug mode using ChessDE.

Even my first question was whether I did this correctly or not. The default program is not going past the dspHandshake() function in my installation, the whole reason why I’m looking at the memory addresses in the first place, because it looks like Arm Cortex isn’t receiving the handShake() signal from LPDSP32. And eventually I want to modify the echo_DSP project so I need to download it to RSL10 chip separately anyway.