Compare commits
2 commits
cbd60728e9
...
89e699e4d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89e699e4d1 | ||
|
|
64fc546a9d |
1 changed files with 3 additions and 2 deletions
5
isr.c
5
isr.c
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue