1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/nrf52: only enable instruction cache if available

The instruction cache is not available on all nrf52 MCUs.
This commit is contained in:
Benjamin Valentin 2020-06-23 00:30:18 +02:00
parent ea2638dcac
commit 2f236cb092

View File

@ -68,8 +68,10 @@ void cpu_init(void)
/* initialize hf clock */
clock_init_hf();
#ifdef NVMC_ICACHECNF_CACHEEN_Msk
/* enable instruction cache */
NRF_NVMC->ICACHECNF = (NVMC_ICACHECNF_CACHEEN_Msk);
#endif
/* softdevice needs to be enabled from ISR context */
#ifdef SOFTDEVICE_PRESENT