Compare commits

...

3 commits

Author SHA1 Message Date
Stephan I. Böttcher
7826cce063 Merge branch 'master' of forge.bexus.org:Stephan/irena-arm 2024-11-15 21:11:32 +01:00
stephan
2777895905 isr: stop_stack() calls in stop()
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9145 bc5caf13-1734-44f8-af43-603852e9ee25
2024-11-15 20:08:16 +00:00
stephan
548bb6b38a isr: call usb_reset() in stop()
git-svn-id: svn+ssh://asterix.ieap.uni-kiel.de/home/subversion/stephan/solo/eda/arm@9144 bc5caf13-1734-44f8-af43-603852e9ee25
2024-11-15 19:55:47 +00:00

5
isr.c
View file

@ -1,5 +1,6 @@
#include "isr.h" #include "isr.h"
#include "message.h" #include "message.h"
#include "usb.h"
#include <lpc2148/vic.h> #include <lpc2148/vic.h>
// see crt.s // see crt.s
@ -20,6 +21,7 @@ __attribute__((noinline,noreturn))
static void stop(const char *why) static void stop(const char *why)
{ {
uart_printf("\n%s called, REBOOT\n", why); uart_printf("\n%s called, REBOOT\n", why);
usb_reset();
reboot_magic = REBOOT_MAGIC; reboot_magic = REBOOT_MAGIC;
Reset_Handler(); Reset_Handler();
while (1); while (1);
@ -97,8 +99,7 @@ void stop_stack(unsigned int const *a)
char *stack = a==irq_stack_guard ? "IRQ" : "USER"; char *stack = a==irq_stack_guard ? "IRQ" : "USER";
uart_printf("\n%s stack guard corrupted: 0x%08x (0x%08x)\n", uart_printf("\n%s stack guard corrupted: 0x%08x (0x%08x)\n",
stack, *a, stack_guard_val); stack, *a, stack_guard_val);
Reset_Handler(); stop("stop_stack");
while (1);
} }
unsigned int stack_margin; unsigned int stack_margin;