mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/saml21: use core_panic in startup.c
This commit is contained in:
parent
93fe62f975
commit
bca23c410b
@ -50,13 +50,23 @@ extern "C" {
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief CPUID_ID_LEN length of cpuid in bytes
|
||||
*/
|
||||
#define CPUID_ID_LEN (16) /* 128 bits long, 16 bytes long */
|
||||
|
||||
/**
|
||||
* @brief Definition of different panic modes
|
||||
*/
|
||||
typedef enum {
|
||||
NMI_HANDLER, /**< non maskable interrupt */
|
||||
HARD_FAULT, /**< hard fault */
|
||||
DUMMY_HANDLER /**< dummy interrupt handler */
|
||||
} panic_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CPU_CONF_H */
|
||||
/** @} */
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "panic.h"
|
||||
|
||||
/**
|
||||
* memory markers as defined in the linker script
|
||||
*/
|
||||
@ -80,12 +82,12 @@ void reset_handler(void)
|
||||
|
||||
void isr_nmi(void)
|
||||
{
|
||||
while (1) {asm ("nop");}
|
||||
core_panic(NMI_HANDLER, "NMI HANDLER");
|
||||
}
|
||||
|
||||
void isr_hard_fault(void)
|
||||
{
|
||||
while (1) {asm ("nop");}
|
||||
core_panic(HARD_FAULT, "HARD FAULT");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -93,7 +95,7 @@ void isr_hard_fault(void)
|
||||
*/
|
||||
void dummy_handler(void)
|
||||
{
|
||||
while (1) {asm ("nop");}
|
||||
core_panic(DUMMY_HANDLER, "DUMMY HANDLER");
|
||||
}
|
||||
|
||||
/* Cortex-M specific interrupt vectors */
|
||||
|
Loading…
Reference in New Issue
Block a user