diff --git a/drivers/misc/nordic_vpr_launcher/nordic_vpr_launcher.c b/drivers/misc/nordic_vpr_launcher/nordic_vpr_launcher.c index 2c2915a7984..5bd43f87fb9 100644 --- a/drivers/misc/nordic_vpr_launcher/nordic_vpr_launcher.c +++ b/drivers/misc/nordic_vpr_launcher/nordic_vpr_launcher.c @@ -7,6 +7,7 @@ #include +#include #include #include #include @@ -38,6 +39,11 @@ static int nordic_vpr_launcher_init(const struct device *dev) LOG_DBG("Loading VPR (%p) from %p to %p (%zu bytes)", config->vpr, (void *)config->src_addr, (void *)config->exec_addr, config->size); memcpy((void *)config->exec_addr, (void *)config->src_addr, config->size); +#if defined(CONFIG_DCACHE) + LOG_DBG("Writing back cache with loaded VPR (from %p %zu bytes)", + (void *)config->exec_addr, config->size); + sys_cache_data_flush_range((void *)config->exec_addr, config->size); +#endif } #endif