From ea96af4d53cbb8c9a4e393102df2aeb746f14d87 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Fri, 15 Aug 2014 10:38:34 +0200 Subject: [PATCH] cpu/stm32f3: let LD3 blink on hardFault --- cpu/stm32f0/startup.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cpu/stm32f0/startup.c b/cpu/stm32f0/startup.c index d29d1ae69d..f696c15c0f 100644 --- a/cpu/stm32f0/startup.c +++ b/cpu/stm32f0/startup.c @@ -19,7 +19,7 @@ */ #include - +#include "board.h" /** * memory markers as defined in the linker script @@ -109,7 +109,12 @@ void isr_bus_fault(void) void isr_usage_fault(void) { - while (1) {asm ("nop");} + while (1) { + for (int i = 0; i < 250000; i++) { + asm ("nop"); + } + LD4_TOGGLE; + } } /* Cortex-M specific interrupt vectors */