From: rincon Date: Wed, 18 Apr 2007 23:12:36 +0000 (+0000) Subject: Option to enable hardware acknowledgements based on CC2420_HW_ACKNOWLEDGEMENTS prepro... X-Git-Tag: tinyos/2.0.1~31 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=24d50eb2fad1920f1322c86247b42433af30b348 Option to enable hardware acknowledgements based on CC2420_HW_ACKNOWLEDGEMENTS preprocessor flag. Updated comments in README. --- diff --git a/tos/chips/cc2420/CC2420ControlP.nc b/tos/chips/cc2420/CC2420ControlP.nc index 1dae5a2d..66d2a80f 100644 --- a/tos/chips/cc2420/CC2420ControlP.nc +++ b/tos/chips/cc2420/CC2420ControlP.nc @@ -177,7 +177,11 @@ implementation { ( 2 << CC2420_MDMCTRL0_CCA_HYST ) | ( 3 << CC2420_MDMCTRL0_CCA_MOD ) | ( 1 << CC2420_MDMCTRL0_AUTOCRC ) | - ( 0 << CC2420_MDMCTRL0_AUTOACK ) | // we now SACK +#if defined(CC2420_HW_ACKNOWLEDGEMENTS) && !defined(CC2420_NO_ACKNOWLEDGEMENTS) + ( 1 << CC2420_MDMCTRL0_AUTOACK ) | +#else + ( 0 << CC2420_MDMCTRL0_AUTOACK ) | +#endif ( 2 << CC2420_MDMCTRL0_PREAMBLE_LENGTH ) ); call RXCTRL1.write( ( 1 << CC2420_RXCTRL1_RXBPF_LOCUR ) | diff --git a/tos/chips/cc2420/CC2420ReceiveP.nc b/tos/chips/cc2420/CC2420ReceiveP.nc index 96df09e7..b024079a 100644 --- a/tos/chips/cc2420/CC2420ReceiveP.nc +++ b/tos/chips/cc2420/CC2420ReceiveP.nc @@ -233,8 +233,8 @@ implementation { case S_RX_PAYLOAD: call CSN.set(); -#ifndef CC2420_NO_ACKNOWLEDGEMENTS - // Sorry about the preprocessing stuff. BaseStation depends on it. +#if !defined(CC2420_NO_ACKNOWLEDGEMENTS) && !defined(CC2420_HW_ACKNOWLEDGEMENTS) + // Sorry about the preprocessing stuff. BaseStation and hw acks depends on it. if (((( header->fcf >> IEEE154_FCF_ACK_REQ ) & 0x01) == 1) && (header->dest == call amAddress()) && ((( header->fcf >> IEEE154_FCF_FRAME_TYPE ) & 7) == IEEE154_TYPE_DATA)) { diff --git a/tos/chips/cc2420/README.txt b/tos/chips/cc2420/README.txt index 518940d3..edd24596 100644 --- a/tos/chips/cc2420/README.txt +++ b/tos/chips/cc2420/README.txt @@ -1,45 +1,64 @@ CC2420 Release Notes 4/11/07 +This CC2420 stack contains two low power listening strategies, +a packet retransmission layer, unique send and receive layers, +ability to specify backoff and use of clear channel assessments +on outbound messages, direct RSSI readings, ability to change +channels on the fly, an experimental 6LowPAN layer (not +implemented by default), general bug fixes, and more. + + Known Issues __________________________________________ - > LPL Lockups when the node is also accessing the USART + > LPL Lockups when the node is also accessing the USART. + This is a SPI bus issue, where shutting off the SPI + bus in the middle of an operation may cause the node + to hang. Look to future versions on CVS for the fix. + > NoAck LPL doesn't ack at the end properly, and also isn't finished being implemented. The CRC of the packet needs to manually be loaded into TXFIFO before continuous modulation. + + > LPL stack is optimized for reliability at this point, since + SFD sampling is not implemented in this version. Low Power Listening Schemes and Preprocessor Variables __________________________________________ There are two low power listening schemes. The default is called "AckLpl", because it inserts acknowledgement gaps and -short backoffs during the packet retransmission process. +short backoffs during the packet retransmission process. This allows the transmitter to stop transmitting early, but increases the -power consumption per receive check. +power consumption per receive check. This is better for slow receive +check, high transmission rate networks. The second is called "NoAckLpl", because it does not insert acknowledgement gaps or backoffs in the retransmission process, so the receive checks are shorter but the transmissions are longer. This is more experimental than -the Ack LPL version. +the Ack LPL version. The radio continuously modulates the channel when +delivering its packetized preamble. This is better for fast receive check, +low transmission rate networks. To compile in the default Ack LPL version, #define the preprocessor variable: - LOW_POWER_LISTENING -or- - ACK_LOW_POWER_LISTENING - + ACK_LOW_POWER_LISTENING (default) -To compile in the NoAck LPL version, #define: +To compile in experimental NoAck LPL w/continuous modulation, #define: NOACK_LOW_POWER_LISTENING -To compile in the PacketLink layer, #define: - +To compile in the PacketLink (auto-retransmission) layer, #define: PACKET_LINK - -To remove SACK auto-acknowledgements, #define: +To remove all acknowledgements, #define: CC2420_NO_ACKNOWLEDGEMENTS + +To use hardware auto-acks instead of software acks, #define: + CC2420_HW_ACKNOWLEDGEMENTS + +