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

nRF52 cache

Hello everyone,

I am using the nRF52832 rev 1, i am not using the softcore. When the cache is enabled as below, the performance actually seems to get worse.

F_NVMC->ICACHECNF = ((NVMC_ICACHECNF_CACHEEN_Enabled << NVMC_ICACHECNF_CACHEEN_Pos) |
                           (NVMC_ICACHECNF_CACHEPROFEN_Enabled << NVMC_ICACHECNF_CACHEPROFEN_Pos));

I then tried with profiling enabled, this didn't help the situation.

I did get the following information for: IHIT: 0x47e0b97d IMISS: 0x01d6bb47

Considering the misses is a lot lower than the hits, i would expect performance to improve.

I also searched through the examples in the nRF5_SDK_11.0.0_89a8197 library, the ICACHECNF register was never set.

Am i setting the register correctly? Has performance benefits of the cache been tested?

Thanks, James

Parents
  • When using a softdevice, it will turn on the Cache by default. The application is free to turn it off if it wants.

    Cache will in most applications bring a performance increase. Spending less time waiting for flash operations will in most cases also decrease the current consumption of an application.

    Information about the flash and cache can be found here. Here you can see timings of flash reads and writes.

Reply
  • When using a softdevice, it will turn on the Cache by default. The application is free to turn it off if it wants.

    Cache will in most applications bring a performance increase. Spending less time waiting for flash operations will in most cases also decrease the current consumption of an application.

    Information about the flash and cache can be found here. Here you can see timings of flash reads and writes.

Children
Related