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.

Problems about caches

Other Parts Discussed in Thread: OMAPL138

Hi,

I've setup a project which do some spectrum analyzing for audio signals on lcdkOMAPL138 board.
And I modified the main loop code of mcaspPlayBk.c in OMAPL138_StarterWare_1_10_03_03 as follow:

        /* Copy the buffer */
            /*
            memcpy((void *)txBufPtr[lastSentTxBuf],
                   (void *)rxBufPtr[lastFullRxBuf],
                   AUDIO_BUF_SIZE);
            */
            unsigned char * txptr=(unsigned char *)txBufPtr[lastSentTxBuf];
            unsigned char * rxptr=(unsigned char *)rxBufPtr[lastFullRxBuf];
            SpectrumAnalyze(rxptr, txptr);
            /*
            ** Send the buffer by setting the DMA params accordingly.
            ** Here the buffer to send and number of samples are passed as
            ** parameters. This is important, if only transmit section
            ** is to be used.
            */
            BufferTxDMAActivate(lastSentTxBuf, NUM_SAMPLES_PER_AUDIO_BUF,
                                (unsigned short)parToSend,
                                (unsigned short)parToLink);
If input and output buffer memeory sections were assigned to SHRAM( o = 0x80000000  l = 0x00020000 ),
the output sounds quite well。But if that memory sections were assigned to DSPL2RAM( o = 0x00800000  l = 0x00040000),
the output is noisy。
All the test code were running with L2 cache disabled。

How can I solve this problem?
Please help!

Weiwei Zheng

  • Today I found L2 SRAM are mapped to two memeory sections, they are 0x00800000-0x0083ffff and 0x11800000-0x1183ffff .  So I modified the code to move the input/output buffer to the higher memory section。And it works。

    Is there any document about this?

    Weiwei Zheng

  • Hi,

    L2 Memory has Dual Memory Mapping,both address points to same physical memory location 0x00800000-0x0083ffff and 0x11800000-0x1183ffff.

    it just that - 

    0x00800000-0x0083ffff is for local access.

    and,

    0x11800000-0x1183ffff is for global access.

    This you can see in OMAP -processor specific PDF file.

    0x00800000-0x0083ffff  In PDF, for DSP only.

    and,

    0x11800000-0x1183ffff - In PDF, for both ARM & DSP.