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:
- The frame length byte must arrive in the SRAM, before the sending of the SFD is complete (160us).
- The last byte of the frame data must arrive in the SRAM before
T = 160us + len(frame) * 32us
after the start command.
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:
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
- Code example
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.
- Code example
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.
- Code example
-
Generated on Fri Aug 10 16:10:05 2007 for SWPM AT86RF230 Rev. A by
1.5.2