From fbde8e8b590651b32583d9250bb4921d5b6ab1a3 Mon Sep 17 00:00:00 2001 From: kusy Date: Thu, 16 Jul 2009 06:46:07 +0000 Subject: [PATCH] thomas's FTSP patch --- tos/chips/cc2420/csma/CC2420CsmaP.nc | 2 +- tos/chips/cc2420/transmit/CC2420TransmitP.nc | 2 ++ tos/chips/msp430/timer/Msp430TimerCapComP.nc | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tos/chips/cc2420/csma/CC2420CsmaP.nc b/tos/chips/cc2420/csma/CC2420CsmaP.nc index c0d5ef37..e67f9217 100644 --- a/tos/chips/cc2420/csma/CC2420CsmaP.nc +++ b/tos/chips/cc2420/csma/CC2420CsmaP.nc @@ -143,7 +143,7 @@ implementation { metadata->ack = FALSE; metadata->rssi = 0; metadata->lqi = 0; - metadata->timesync = FALSE; + //metadata->timesync = FALSE; metadata->timestamp = CC2420_INVALID_TIMESTAMP; ccaOn = TRUE; diff --git a/tos/chips/cc2420/transmit/CC2420TransmitP.nc b/tos/chips/cc2420/transmit/CC2420TransmitP.nc index 7462c9b2..a8367e54 100644 --- a/tos/chips/cc2420/transmit/CC2420TransmitP.nc +++ b/tos/chips/cc2420/transmit/CC2420TransmitP.nc @@ -278,6 +278,8 @@ implementation { call CSN.clr(); call TXFIFO_RAM.write( absOffset, (uint8_t*)timesync, sizeof(timesync_radio_t) ); call CSN.set(); + //restoring the event time to the original value + *timesync += time32; } if ( (call CC2420PacketBody.getHeader( m_msg ))->fcf & ( 1 << IEEE154_FCF_ACK_REQ ) ) { diff --git a/tos/chips/msp430/timer/Msp430TimerCapComP.nc b/tos/chips/msp430/timer/Msp430TimerCapComP.nc index 548aecc3..52355369 100644 --- a/tos/chips/msp430/timer/Msp430TimerCapComP.nc +++ b/tos/chips/msp430/timer/Msp430TimerCapComP.nc @@ -65,7 +65,7 @@ implementation ccis : 0, // capture/compare input select clld : 0, // TBCL1 loads on write to TBCCR1 cap : 1, // compare mode - scs : 1, // synchronous capture mode + scs : 0, // non synchronous capture mode ccie : 0, // capture compare interrupt enable }; return CC2int(x); -- 2.39.2