Extended Frame Receive Procedure (RX_AACK)

This section describes how the parameters for the Extended Operating Mode are configured and how frames are received in the RX_AACK mode.

In the RX_AACK operating mode, described in section 5.2.3 (RX_AACK_ON Receive with Automatic ACK) of the AT86RF212 datasheet, incoming frames are checked against the address filter and for a valid FCS. If these checks are passed, the TRX_IRQ_TRX_END interrupt is generated at the end of the received frame and an optional required acknowledgement frame is transmitted.

Parameters:
coord This bit specifies, whether the radio transceiver is operated as PAN coordinator {1} or as device {0}.
pendd This bit specifies, whether the device has pending data. During generation of an acknowledgment, the radio transceiver will copy this bit into the frame pending subfield of the frame control field in response to a data request MAC command.
slmode This bit specifies, whether the radio transceiver is operated in slotted {1} or unslotted {0} operation mode, as described in section 5.2.3.5 (Slotted Operation, Slotted Acknowledgement) of the AT86RF212 datasheet.
Return values:
tracstat Result of a RX_AACK transaction from sub register SR_TRAC_STATUS :
  • TRAC_SUCCESS : The frame reception was successful.
  • TRAC_SUCCESS_WAIT_FOR_ACK : This value occurs if the parameter slmode is set to 1 and the received frame requests an acknowledgement. In this case the sending of the acknowledgement frame needs to be initiated from the MCU by pulling TRX_PIN_SLP_TR.
  • TRAC_INVALID : The ongoing transaction was aborted.
Note:
The Extended Operating Mode of the radio transceiver was designed to handle the requirements of the IEEE 802.15.4 standard. The section Extended Configuration of RX_AACK mode describes how the RX_AACK mode can be used for proprietary and non-standard compliant operations.
Use Cases:


PHY_CONFIG_RX_AACK

The following sequence should be used to configure the RX_AACK mode.

inline_mscgraph_85
Code example
    /* AT86RF212::[CONFIG] */
    trx_bit_write(SR_AACK_I_AM_COORD, coord);
    trx_bit_write(SR_SLOTTED_OPERATION, slmode);

PHY_SET_PD

The following sequence is used to set the pending data bit pendd in an automatically generated acknowledgement frame. After the reception of a MAC command frame of type "Data Request" (command frame identifier 0x04), the content of the sub register SR_AACK_SET_PD is copied into the frame pending subfield of the generated acknowledgement frame (see section 7.2.2.3.1 of the IEEE 802.15.4-2006 standard). For all other frames requesting an ACK, the frame pending subfield is set to 0, regardless of the content of sub register SR_AACK_SET_PD.

Note:
In order to set the pending data bit when the radio transceiver is in state BUSY_RX_AACK, the sequence PHY_SET_PD_BUSY is used.
inline_mscgraph_86
Code example
    /* AT86RF212::[ACTIVE] */
    trx_bit_write(SR_AACK_SET_PD, pendd);

PHY_SET_PD_BUSY

The following sequence is used to set the pending data bit pendd during state BUSY_RX_AACK. After the interrupt TRX_IRQ_AMI the frame upload can be started using the Frame Buffer Empty Indicator sequence. With the interrupt TRX_IRQ_TRX_END occured, the frame upload is finished and the value of pendd can be computed within tTxAck in order to take effect with the automatically generated acknowledgement frame.

inline_mscgraph_87
Code example
    /* AT86RF212::[BUSY_RX_AACK] */
    /* TRX_IRQ_AMI occurs here */
    frm = trx_frame_read_blm();
    /* TRX_IRQ_TRX_END occurs here */
    pendd = proc_frm(frm);
    trx_bit_write(SR_AACK_SET_PD, pendd);

PHY_DATA_INDICATION_RX_AACK_UNSLOTTED

The result of a RX_AACK transaction is stored in the sub register SR_TRAC_STATUS after the TRX_IRQ_TRX_END interrupt. In unslotted operation mode, tracstat can be either TRAC_SUCCESS or TRAC_INVALID.

The transmission of the ACK frame starts tWaitAck after the end of the frame reception. The complete ACK frame is on air after tAckDone.

The internal timing for the ACK frame processing in RX_AACK mode is shown below:

  == RX ==:======================= TX =========================:======= RX =======
         0         12                                        100  BPSK
         0         12                                         34  OQPSK
     +---|         |---+---+---+---+---+---+---+---+---+---+---|     time [symbols]
   --| F |---------|   Preamble    |SFD|PHR|   ACK frame       |------------------>
     +---|         |---+---+---+---+---+---+---+---+---+---+---|
         |         |                                           |
         t0        t1                                          t2

 

Note:

>>  If an acknowledgement frame has to be transmitted, the radio transceiver stays in state BUSY_RX_AACK for the duration tAckDone (t2) after the interrupt TRX_IRQ_TRX_END.
>>  The state BUSY_RX_AACK can be left immediately by writing CMD_FORCE_TRX_OFF or CMD_FORCE_PLL_ON to sub register SR_TRX_CMD.
inline_mscgraph_88
Code example
    /* AT86RF212::RX_AACK_ON && AT86RF212::BUSY_RX_AACK */
    delay(tFrame);
    tracstat = trx_bit_read(SR_TRAC_STATUS);
    frm = trx_frame_read();
    /* AT86RF212::RX_AACK_ON */

PHY_DATA_INDICATION_RX_AACK_SLOTTED

Section 7.5.6.4.2. of the IEEE 802.15.4-2006 standard states that "The transmission of an acknowledgment frame in the CAP shall commence either aTurnaroundTime symbols after the reception of the last symbol of the data or MAC command frame or at a backoff slot boundary." The AT86RF212 supports both ACK transmission modes. In order to activate the ACK transmission on slot boundaries the SR_SLOTTED_OPERATION bit needs to be set. If an ACK frame has to be transmitted, the radio transceiver expects a rising edge on TRX_PIN_SLP_TR to actually start the transmission.

The result tracstat of a RX_AACK transaction is stored in the sub register SR_TRAC_STATUS after the TRX_IRQ_TRX_END interrupt. In slotted operation mode tracstat can be either TRAC_SUCCESS, TRAC_SUCCESS_WAIT_FOR_ACK, or TRAC_INVALID.

The internal timing for the ACK frame processing in RX_AACK mode is shown below:

  == RX ==:== IDLE ==:=================== TX ====================:======== RX =======
         0          tack                                     88+tack  BPSK
         0          tack                                     22+tack  OQPSK
     +---|           |---+---+---+---+---+---+---+---+---+---+---|     time [symbols]
   --| F |-----+-----|   Preamble    |SFD|PHR|   ACK frame       |------------------>
     +---|     |     |---+---+---+---+---+---+---+---+---+---+---|
         |     |     |                                           |
        t0a   t1a   t2a                                         t3a

 

Note:
Usually the frame upload is started after time t1a. If tSlWait is larger than the upload duration, the frame upload can alternatively be done between t0a and t1a.
inline_mscgraph_89
Code example
    /* AT86RF212::RX_AACK_ON && AT86RF212::BUSY_RX_AACK */
    delay(tFrame);
    tracstat = trx_bit_read(SR_TRAC_STATUS);
    ASSERT(tracstat==SUCCESS_WAIT_FOR_ACK);
    trx_pinset_slptr(1);
    delay(t7);
    trx_pinset_slptr(0);
    frm = trx_frame_read();
    /* AT86RF212::RX_AACK_ON */

Generated on Mon Aug 17 13:35:01 2009 for SWPM AT86RF212 by  doxygen 1.5.6