Transitions to State TRX_OFF

This section describes how the state TRX_OFF is entered. There are two ways to get into this state.

  1. Writing CMD_TRX_OFF to sub register SR_TRX_CMD requests a state change towards TRX_OFF. If the radio transceiver is in one of the [BUSY] states, the ongoing transaction will be finished before the state change occurs. Otherwise, the state transition is executed immediately. The following transitions are defined:
  2. Writing CMD_FORCE_TRX_OFF to sub register SR_TRX_CMD causes an immediate transition. In this case, any ongoing transaction in one of the [BUSY] states is canceled and the state change is done.


PHY_STATE_[PLL_ACTIVE]__TRX_OFF

inline_mscgraph_34
Code example
    /* AT86RF212::[PLL_ACTIVE] */
    trx_bit_write(SR_TRX_CMD, CMD_TRX_OFF);
    delay(tTRSw);
    /* AT86RF212::TRX_OFF */
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==TRX_OFF);

PHY_STATE_[BUSY]__TRX_OFF

If the command CMD_TRX_OFF is written to the sub register SR_TRX_CMD and the radio transceiver is in one of the [BUSY] states, the ongoing transmit or receive transaction is completed and the state change to TRX_OFF occurs with the TRX_IRQ_TRX_END interrupt.

Note:

>>  It is possible to cancel any ongoing transaction and force an immediate state change by using CMD_FORCE_TRX_OFF (see PHY_FORCE_[ACTIVE]__TRX_OFF). This might be especially useful in BUSY_TX_ARET, when long backoff times and many CSMA/frame retransmissions are configured.
>>  This use case is not valid for state BUSY_RX_AACK, because a TRX_IRQ_TRX_END interrupt does not necessary occur in this state. For handling of this state refer to PHY_STATE_BUSY_RX_AACK__TRX_OFF.
inline_mscgraph_35
Code example
    /* AT86RF212::[BUSY] */
    trx_bit_write(SR_TRX_CMD, CMD_TRX_OFF);
    /* TRX_IRQ_TRX_END occurs here */
    /* AT86RF212::TRX_OFF */
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==TRX_OFF);

PHY_STATE_BUSY_RX_AACK__TRX_OFF

If the radio transceiver is in state BUSY_RX_AACK, an TRX_IRQ_TRX_END occurs only, if the incoming frame matches the address filter and if the FCS is correct. If the acknowledgment request bit is set in the frame control field of the frame header and a TRX_IRQ_TRX_END interrupt occurs, an automatically generated acknowledgement will be transmitted. Thus, the transceiver will stay in BUSY_RX_AACK for time tPAck after TRX_IRQ_TRX_END. Otherwise, it will return to TRX_OFF at latest after tFrame.

Note:

>>  It is possible to read the acknowledgment request subfield of a frame after TRX_IRQ_TRX_END. If this bit is not set, the radio transceiver will be in state TRX_OFF immediately after the interrupt.
>>  To avoid long timeouts, it is possible to use command CMD_FORCE_TRX_OFF to initiate an immediate state change (see PHY_FORCE_[ACTIVE]__TRX_OFF).
>>  The use case shown here is only valid for a node operating in unslotted mode. If CMD_TRX_OFF is written to a node operating in slotted mode the procedure shown in PHY_DATA_INDICATION_RX_AACK_SLOTTED is finished and the node will be in TRX_OFF afterwards.
inline_mscgraph_36
Code example
    /* AT86RF212::BUSY_RX_AACK */
    trx_bit_write(SR_TRX_CMD, TRX_OFF);
    delay(tFrame);
    /* AT86RF212::TRX_OFF */
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==TRX_OFF);

PHY_FORCE_[ACTIVE]__TRX_OFF

Writing CMD_FORCE_TRX_OFF to sub register SR_TRX_CMD in any of the [ACTIVE] states cancels any ongoing transmit or receive transcation and switches the radio transceiver within tTR12 to state TRX_OFF.

In order to ensure that the radio transceiver is not in one of the *_NOCLK states, the pin TRX_PIN_SLP_TR is set to LOW before CMD_FORCE_TRX_OFF is written.

inline_mscgraph_37
Code example
    /* AT86RF212::[ACTIVE] */
    trx_pinset_slptr(0);
    trx_bit_write(SR_TRX_CMD, CMD_FORCE_TRX_OFF);
    delay(tTR12);
    /* AT86RF212::TRX_OFF */
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==TRX_OFF);

Generated on Mon Aug 17 13:34:59 2009 for SWPM AT86RF212 by  doxygen 1.5.6