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
  • Hi Anders, thanks for getting back to me. The issue has been further investigated at our end, it was been found that when a part of the system is sped up it fails in a very similar way to what we were finding when the performance was worse. The performance was remeasured and it has been found to increase when the cache is switched on. So the cache is not an issue.

    When we were trying to calculate the rough performance gains we should see when enabling the cache, we looked at the datasheet to try and see the time it takes to perform a flash read. We couldn't find this information, is this available? Thanks again, James.

Reply
  • Hi Anders, thanks for getting back to me. The issue has been further investigated at our end, it was been found that when a part of the system is sped up it fails in a very similar way to what we were finding when the performance was worse. The performance was remeasured and it has been found to increase when the cache is switched on. So the cache is not an issue.

    When we were trying to calculate the rough performance gains we should see when enabling the cache, we looked at the datasheet to try and see the time it takes to perform a flash read. We couldn't find this information, is this available? Thanks again, James.

Children
No Data
Related