This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Enabling / Disabling I-Cache while Softdevice is Enabled on NRF52840

NRF52840 - SDK 15.0 - SD 6.0.0

I'm trying to profile some code performance and I want to see how the I-Cache is impacting it.
If I attempt to access the NVMC register ICACHECNF once SD is enabled my device goes into a reset loop, crashing every time I try to turn off the I-CACHE.  Obviously a question of privilege once SD is enabled- so Is there a SD function/SVC call to "properly" enable/disable the I-Cache? Since SD engages it by default, I can't turn it off before I start SD.  

I also didn't see anything in the SDK_CONFIG.h with CACHE.




 

Parents Reply
  • I'm running with the S140 SoftDevice and the ICACHECNF value is 0x01.  Since I didn't enable it, and the default value in that register is 0, according to the datasheet, that must mean the SoftDevice enabled it.  That implies strongly that you can't disable it when running the SoftDevice, because it wouldn't know that you'd disabled it.... the state of the register would be identical to its value after a reset.

Children
Related