diff options
Diffstat (limited to 'src/arch/stm32l4xxx/peripherals/irq.c')
-rw-r--r-- | src/arch/stm32l4xxx/peripherals/irq.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/stm32l4xxx/peripherals/irq.c b/src/arch/stm32l4xxx/peripherals/irq.c index e79d8ae..0313113 100644 --- a/src/arch/stm32l4xxx/peripherals/irq.c +++ b/src/arch/stm32l4xxx/peripherals/irq.c @@ -5,6 +5,8 @@ #include "arch/stm32l4xxx/peripherals/nvic.h" #include "kern/delay.h" #include "kern/gpio/gpio_manager.h" +#include "kern/init.h" +#include "kern/log.h" #define IRQ_RESERVED(n) #define IRQ(name, uname_, n) \ @@ -49,6 +51,12 @@ const void* vectors[] __attribute__((section(".vectors"))) = { */ void unhandled_isr(uint8_t number) { + if (get_system_init_level() > 2) { + /* If we have access to logging, just log the unhandled interrupt + * before contituing with the fancy flashing. */ + klogf("Unhandled ISR: %d\n", (int)number); + } + int ec; gpio_pin_opts_t opts = DEFAULT_GPIO_OPTS_OUTPUT; gpio_reserved_pin_t pin3 = reserve_gpio_pin(GPIO_PIN_PB3, &opts, &ec); |