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.

Cache Invalidation in DSP

Hello,

I am trying to port a simple application in which ARM generates data for DSP. For that I have allocated memory from shared region on GPP and passed the pointer (translated) to DSP using MSG. Now, the results which DSP is generating are not correct, and I am suspecting Cache to be the root cause. I tried to use the API HAL_cacheWb() but the during linking it fails and throws the following error

 

Compiling Debug...

<Linking>

 

 undefined       first referenced    

  symbol             in file         

 ---------       ----------------    

 _HAL_cacheWb Debug/tskMessage.obj

 

error: unresolved symbols remain

error: errors encountered during linking; "Debug/helloDSP.out" not built

My makefile is using the following libraries to link 

-ldsplink.lib -ldsplinkpool.lib -ldsplinkmpcs.lib -ldsplinkmplist.lib -ldsplinkmsg.lib -ldsplinknotify.lib -ldsplinkringio.lib -ldsplinkdata.lib

What am i missing to link the function ? Also, how can i disable caching on DSP entirely. I tried to modify  prog.module("GBL").C64PLUSMAR128to159  = 0x00000080 ; to 

prog.module("GBL").C64PLUSMAR128to159  = 0x00000000 ; in the dsplink-omap3530-base.tci file, but still the issue persists. Can you please point me how to do it rightly ?

 

 

Sachin.

 

  • You will need to be careful about cache issues on both the ARM and the DSP.  Is cache enabled on the ARM as well?  If so, after generating the data you should do a writeback from the ARM side to make sure all the data gets pushed to the physical memory.  You should then do an invalidate on the DSP side before reading from that buffer.  After the DSP finishes processing the data you should perform a writeback on that data.  Finally, if the ARM intends to read the data that was sent back from the DSP then the ARM would need to do an invalidate prior to reading.

    Is the linker error you're seeing on the DSP side?  If so, i recommend using the BCACHE APIs that are bundled with BIOS for this purpose.  I don't recognize the HAL_* APIs you mentioned.

  • Thanks Brad. I will try the BCACHE APIs.