From d16b9ad15d3a87a423c409343d456caeec6d50a8 Mon Sep 17 00:00:00 2001 From: nifi Date: Thu, 17 Aug 2006 08:27:54 +0000 Subject: [PATCH] bug fix: LPM_AWAKE() on MSP430 modifies the stack and may only be called in the interrupt --- platform/esb/dev/tr1001.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/esb/dev/tr1001.c b/platform/esb/dev/tr1001.c index 4cc8ba2d6..446c1de33 100644 --- a/platform/esb/dev/tr1001.c +++ b/platform/esb/dev/tr1001.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: tr1001.c,v 1.1 2006/06/18 07:49:33 adamdunkels Exp $ + * @(#)$Id: tr1001.c,v 1.2 2006/08/17 08:27:54 nifi Exp $ */ /** * \addtogroup esb @@ -343,6 +343,9 @@ interrupt (UART0RX_VECTOR) tr1001_rxhandler(void) { tr1001_default_rxhandler_pt(RXBUF0); + if(tr1001_rxstate == RXSTATE_FULL) { + LPM_AWAKE(); + } } /*---------------------------------------------------------------------------*/ static void @@ -501,7 +504,6 @@ PT_THREAD(tr1001_default_rxhandler_pt(unsigned char incoming_byte)) PACKET_ACCEPTED(); tr1001_drv_request_poll(); - LPM_AWAKE(); /* We'll set the receive state flag to signal that a full frame is present in the buffer, and we'll wait until the buffer has