2014-02-24 16:09:53 +01:00
|
|
|
/*
|
2015-05-09 18:12:18 +02:00
|
|
|
* Copyright (C) 2014, 2015 INRIA
|
2014-02-24 16:09:53 +01:00
|
|
|
*
|
2014-07-31 19:45:27 +02: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.
|
2014-02-24 16:09:53 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-07-06 01:17:05 +02:00
|
|
|
* @ingroup cpu_msp430_common
|
2014-02-24 16:09:53 +01:00
|
|
|
* @{
|
|
|
|
*
|
2015-05-09 18:12:18 +02:00
|
|
|
* @file
|
2014-02-24 16:09:53 +01:00
|
|
|
* @brief Crash handling functions implementation for MSP430 MCUs
|
|
|
|
*
|
|
|
|
* @author Kévin Roussel <Kevin.Roussel@inria.fr>
|
2015-05-09 18:12:18 +02:00
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
2014-02-24 16:09:53 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "lpm.h"
|
|
|
|
|
2015-05-09 18:12:18 +02:00
|
|
|
void panic_arch(void)
|
2014-02-24 16:09:53 +01:00
|
|
|
{
|
|
|
|
/* disable watchdog and all possible sources of interrupts */
|
|
|
|
WDTCTL = WDTPW | WDTHOLD;
|
|
|
|
#if DEVELHELP
|
|
|
|
/* enter infinite loop, into deepest possible sleep mode */
|
|
|
|
while (1) {
|
|
|
|
lpm_set(LPM_OFF);
|
|
|
|
}
|
|
|
|
#endif
|
2014-03-16 23:53:56 +01:00
|
|
|
|
2014-02-24 16:09:53 +01:00
|
|
|
}
|