From 4fa7d3a52dda9c784b97fae015b2b73af10af986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Mi=C5=9B?= Date: Tue, 11 Jul 2017 19:51:08 +0200 Subject: [PATCH] [nRF52840] enable I-code cache in nRF52840 by default (#1977) --- examples/platforms/nrf52840/platform.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/platforms/nrf52840/platform.c b/examples/platforms/nrf52840/platform.c index 0f5ba4179..f0146a0dd 100644 --- a/examples/platforms/nrf52840/platform.c +++ b/examples/platforms/nrf52840/platform.c @@ -34,6 +34,7 @@ #include +#include #include #include "platform-nrf5.h" @@ -46,6 +47,9 @@ void PlatformInit(int argc, char *argv[]) (void)argc; (void)argv; + // Enable I-code cache + NRF_NVMC->ICACHECNF = NVMC_ICACHECNF_CACHEEN_Enabled; + nrf_drv_clock_init(); #if (OPENTHREAD_CONFIG_ENABLE_DEFAULT_LOG_OUTPUT == 0)