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.

RM57 Enabling / Disabling MPU on the fly (whilst using cache)

Other Parts Discussed in Thread: HALCOGEN

I have a problem with my test harness code that causes it to execute incorrectly (out of order and other strangethings):

The following pseudo code is what I am trying to achieve (very simplified). The enabling and initializing and disabling of the MPU (and the cache) is performed by the function provided in the HalCoGen produced code.

SetupMPU (and enable)

enableCache

Do some tests 1

disableCache

DisableMPU

Do some tests 2

 

This cycle is basically repeated as the tests are required to be run both with or without the MPU.

However the second set of tests does not execute correctly, in fact the code executes out of sequence.

So the question really is how to I enable the MPU and cache, run some code, disable cache and MPU and run some code in a cycle without anything getting corrupted?

Thanks,

Rik