Frame Transmission (TX)

For transmission of frames in the basic mode, the radio transceiver needs to be in the state PLL_ON (see also section Transitions to State PLL_ON [09]).

Frame transmit start commands:
There are two methods to initiate a frame transmission, either by writing CMD_TX_START to sub register SR_TRX_CMD (register start) or with a rising edge on the pin TRX_PIN_SLP_TR (pin start). In case of a pin start transmission, it needs to be ensured, that the TRX_PIN_SLP_TR stays for at least 65 ns at high level. This time is internally needed by the radio transceiver for detecting a rising edge.
16 us after one of the two frame start commands has been issued, the radio transceiver sends out the 802.15.4 synchronisation header (SHR), which consists of 4 octets preamble and 1 octet start-of-frame delimitter (SFD). The transmission of the whole SHR takes 160 us. After transmitting SHR, PHR and PSDU, the TRX_IRQ_TRX_END interrupt is generated.

Timing constraints for frame transmission:
If the SPI speed is high enough, the frame can be downloaded after the transmit start command has been issued. In this case the the following conditions needs to be met:
If one of the above conditions is violated, an TRX_IRQ_TRX_UR interrupt occurs and the frame was incorrectly transmitted (see PHY_EVENT_TRX_UR_TX).

Parameters:
frame A frame consists of up to 127 octets. If the sub register SR_TX_AUTO_CRC_ON is set to one, the last two bytes need not to be downloaded, because the FCS is calculated internally by the radio transceiver (see also PHY_SET_TX_AUTO_CRC). The frame is stored as follows in the SRAM of the radio transceiver:
        0   1   2                    L-2 L-1  L
      +---+---+---+---+---+---+/..../+---+---+---+
      | L | D | D | D | D | D |     | D |D/F|D/F|
      +-o-+---+---+---+---+---+/..../+---+---+-o-+
        |                                      |
        |<--- access via "SRAM Access Mode" -->|
        |                                      |
        |<- access via "Frame Transmit Mode" ->|

        L = length byte, D = data byte, F = FCS byte
  

The following sequences are defined:


PHY_SET_TX_AUTO_CRC

The TX-Auto-CRC feature enables the hardware generation of a FCS value. If the sub register SR_TX_AUTO_CRC_ON is set to 1, the last two FCS bytes of a frame are internally calculated. Therefore they do not need to be downloaded with the frame down command (see trx_frame_read).

   0   1   2                        L-1  L
 +---+---+---+---+---+---+---+/.../+---+---+
 | L | D | D | D | D | D | D |     | F | F |
 +---+---+---+---+---+---+---+/.../+-o-+-o-+
                                     +---+
                                       radio transceiver generated FCS
 

inline_mscgraph_54
Code example

PHY_DATA_REQUEST_PINSTART

This sequence describes a frame transmission, which is initiated with a rising edge on pin TRX_PIN_SLP_TR. If the timing constraint can not be ensured, the frame shall be downloaded before the pin TRX_PIN_SLP_TR is toggled. After the last byte of the frame has been sent out, the TRX_IRQ_TRX_END interrupt is generated and the frame was sent correctly.

Note:
If the check for BUSY_TX after initiating the transmission fails, the transmission shall be initiated again. If the frame was downloaded before toggling pin TRX_PIN_SLP_TR, the frame shall also be downloaded again.
inline_mscgraph_55
Code example
    trx_pinset_slptr(1);
    delay_ns(65);
    trx_pinset_slptr(0);
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==BUSY_TX);
    trx_frame_write(len(frame), frame);
    /* TRX_IRQ_TRX_END occurs here */

PHY_DATA_REQUEST_REGSTART

This sequence describes a frame transmission, which is initiated by writing to the sub register SR_TRX_CMD the value CMD_TX_START. If the timing constraint can not be ensured, the frame shall be downloaded before the value CMD_TX_START is written to sub register SR_TRX_CMD. After the last byte of the frame has been sent out, the TRX_IRQ_TRX_END interrupt is generated and the frame was sent correctly.

Note:
If the check for BUSY_TX after initiating the transmission fails, the transmission shall be initiated again. If the frame was downloaded before writing the CMD_TX_START command, the frame shall also be downloaded again.
inline_mscgraph_56
Code example
    trx_bit_write(SR_TRX_CMD, CMD_TX_START);
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==BUSY_TX_ARET);
    trx_frame_write(len(frame), frame);
    /* TRX_IRQ_TRX_END occurs here */

Generated on Fri Aug 10 16:10:05 2007 for SWPM AT86RF230 Rev. A by  doxygen 1.5.2