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.

BCACHE_inv( ) cause system memory error on 6431

Dear Sir,

I use a DMA function in my application.

Followign is the begining of the DMA code:

int EDMA3_Copy(signed char *src, signed char *dstPtr, unsigned int count)
{

  // write back src
  BCACHE_wb ( (void *)src, count, 1 ); // wait for it to finish
  // invalidate dst
  BCACHE_inv( (void *)dstPtr, count, 1 ); // wait for it to finish

 

If the dstPtr is a global array in .far, then I won't have any problem when calling BCACHE_inv( ).

But if dstPtr is an allocating memory in heap, calling BCACHE_inv( ) will cause system memory error.

Please refer to the following figure:

 Why BCACHE_inv( ) causes memory error?

 Thank you!!

Best Regards,

 

Eric Fang