AnsweredAssumed Answered

MPC5777C/e200z759 DCache Invalidation, L1CSR0 Access

Question asked by Jeff Campbell on Apr 10, 2017
Latest reply on Apr 17, 2017 by Jeff Campbell



I'm performing Flash erase operations and have ended up needing to invalidate the D-Cache, because it holds data that should have been erased.


I'm fairly certain it's a cache problem, because the operation works fine with cache disabled entirely.  However, I'm hoping to just invalidate the cache so it can be still be used.


I'm working on the e200z759 core in a Greenhills environment.


Here's the code I'm trying to use, defined inside an asm function:


/** - Get current L1CSR0 value */
mfspr r3,L1CSR0;

/** - Use R4 for mask (set bit 30) */
e_lis r4,0x0000;
e_ori r4,r4,0x0002;

/** - Apply mask */
or r3,r3,r4;
mtspr 1010,r3;


When this code runs, it reads from L1CSR0 properly, but writing to it has no effect and I don't think it triggers an invalidation.  Is there something else I need to do to write to the register?