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 */
/** - Use R4 for mask (set bit 30) */
/** - Apply mask */
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?