Commit 9ed399cd authored by Arvid Rosén's avatar Arvid Rosén Committed by Andrzej Puzdrowski
Browse files

zephyr: Turn off cache for Cortex M7 before chain-loading. The new image will fail otherwise.

Signed-off-by: default avatarArvid Rosén <arvid@softube.com>
parent 2a01f3f3
Loading
Loading
Loading
Loading
+7 −0
Changes for boot/zephyr/main.c: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -128,6 +128,13 @@ static void do_boot(struct boot_rsp *rsp)
    vt = (struct arm_vector_table *)(flash_base +
                                     rsp->br_image_off +
                                     rsp->br_hdr->ih_hdr_size);

#ifdef CONFIG_CPU_CORTEX_M7
    /* Disable instruction cache and data cache before chain-load the application */
    SCB_DisableDCache();
    SCB_DisableICache();
#endif

    irq_lock();
#ifdef CONFIG_SYS_CLOCK_EXISTS
    sys_clock_disable();