2015-02-09 18:27:42 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015 INRIA
|
2015-02-17 13:16:40 +01:00
|
|
|
* Copyright (C) 2015 Eistec AB
|
2015-02-09 18:27:42 +01:00
|
|
|
*
|
2015-02-17 13:16:40 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
|
|
|
* Public License v2.1. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
2015-02-09 18:27:42 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup cortex-m0_common
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Crash handling functions implementation for ARM Cortex-based MCUs
|
|
|
|
*
|
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
2015-02-17 13:16:40 +01:00
|
|
|
* @author Joakim Gebart <joakim.gebart@eistec.se>
|
2015-02-09 18:27:42 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "lpm.h"
|
|
|
|
|
2015-05-09 18:12:18 +02:00
|
|
|
void panic_arch(void)
|
2015-02-09 18:27:42 +01:00
|
|
|
{
|
|
|
|
#if DEVELHELP
|
2015-02-17 13:16:40 +01:00
|
|
|
/* The bkpt instruction will signal to the debugger to break here. */
|
|
|
|
__ASM("bkpt #0");
|
2015-02-09 18:27:42 +01:00
|
|
|
/* enter infinite loop, into deepest possible sleep mode */
|
|
|
|
while (1) {
|
|
|
|
lpm_set(LPM_OFF);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|