DSPRelated.com
Forums

CACHE_flushing

Started by joseph_lyons_79 October 29, 2004


Hi,

I'm using HPI to read some memory addresses from my c6711DSK -
"semaphore" below. These addresses are mapped to RAM. I have L2
Caching set to 2-way to free up the bottom 32kBytes of internal
memory.

My code looks something like this -

#pragma DATA_SECTION(semaphore, "SEMAPHORE")
Uns semaphore = 0;

Uns sem=0;

...

CACHE_flush(CACHE_L2ALL, (void *)0, 0);
if(count=!800)
{
semaphore = sem;
}

I'm wondering do I need to flush all of the cache? If not, how do I
establish where to flush. I'm using some arrays also in a similar way
to the semaphore variable above. These arrays are used to ping-pong
data to my PC based application. I'm hoping I can aviod the use of
the CACHE_flush(CACHE_L2ALL, (void *)0, 0) call because it is loading
my processor and causing my to miss some samples from my Codec.
Perhaps I could declare the variable "sem" above in such a way as to
avoid them being cached. Perhaps I could map "sem" to RAM also -
maybe?? and the arrays I'm using also.
Cheers,

Joe.