Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Problems about caches

$
0
0

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


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>