diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/init.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/cortex-m/init.S b/core/cortex-m/init.S index 00072c7f0f..0f5a3e2310 100644 --- a/core/cortex-m/init.S +++ b/core/cortex-m/init.S @@ -364,6 +364,16 @@ data_loop: isb #endif /* CONFIG_FPU */ +#ifdef CONFIG_DEBUG_DISABLE_WRITE_BUFFER + /* Disable write buffer used for default memory map accesses */ + ldr r0, =0xE000E008 /* Load address of ACTLR */ + ldr r1, [r0] /* Read ACTLR */ + orr r1, r1, #2 /* Set DISDEFWBUF bit */ + str r1, [r0] /* Write back ACTLR */ + dsb /* Wait for store to complete */ + isb /* Reset pipeline */ +#endif /* CONFIG_DEBUG_DISABLE_WRITE_BUFFER */ + /* Jump to C code */ bl main |