summaryrefslogtreecommitdiff
path: root/core/cortex-m/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m/panic.c')
-rw-r--r--core/cortex-m/panic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c
index 24174cfb2d..703586c135 100644
--- a/core/cortex-m/panic.c
+++ b/core/cortex-m/panic.c
@@ -425,5 +425,10 @@ void bus_fault_handler(void)
void ignore_bus_fault(int ignored)
{
+ /*
+ * Flash code might call this before cpu_init(),
+ * ensure that the bus faults really go through our handler.
+ */
+ CPU_NVIC_SHCSR |= CPU_NVIC_SHCSR_BUSFAULTENA;
bus_fault_ignored = ignored;
}