1 frame receive procedure, 2 frame transmit procedure, Atmega128rfa1 – Rainbow Electronics ATmega128RFA1 User Manual
Page 84

84
8266A-MCU Wireless-12/09
ATmega128RFA1
9.7.1 Frame Receive Procedure
A frame reception comprises of two actions: The PHY listens for a frame, receives and
demodulates the frame to the Frame Buffer and signalizes its reception to the
application software. The application software reads the available frame data from the
Frame Buffer after or during the progress of the frame reception.
While in state RX_ON or RX_AACK_ON the radio transceiver searches for incoming
frames on the selected channel. First a TRX24_RX_START interrupt indicates the
detection of an IEEE 802.15.4 compliant frame assuming the appropriate interrupts are
enabled. The frame reception is completed when issuing the TRX24_RX_END
interrupt.
Different Frame Buffer read access scenarios are recommended for:
•
Non-time critical applications: read access starts after the TRX24_RX_END interrupt;
•
Time-critical applications: read access starts after the TRX24_RX_START interrupt;
The controller must ensure to read valid Frame Buffer contents. Reading frame data
before frame reception is finished can lead to invalid data, if buffer regions are
accessed which are not yet updated with the new frame.
While receiving a frame the data needs to be primarily stored in the Frame Buffer
before reading it. This is ensured by accessing the first Frame Buffer byte at least 32 µs
after the TRX24_RX_START interrupt.
It is recommended for operations considered to be not time-critical to wait for the
TRX24_RX_END interrupt before starting a Frame Buffer read access. The following
figure illustrates the frame receive procedure using the TRX24_RX_END interrupt.
Figure 9-27. Transactions between radio transceiver and microcontroller during receive
T
ra
n
sc
e
iv
e
r
M
ic
ro
co
n
tr
o
lle
r
IRQ issued (RX_START)
IRQ issued (RX_END)
Read frame data (Frame Buffer access)
Read TST_FRAME_LENGTH register
(Register access)
Critical protocol timing could require starting the Frame Buffer read access after the
TRX24_RX_START interrupt. The first byte of the frame data can be read 32 µs after
the TRX24_RX_START interrupt. The application software must ensure to read slower
than the frame is received. Otherwise a Frame Buffer under-run occurs and the frame
data may be not valid.
9.7.2 Frame Transmit Procedure
A frame transmission comprises of the two actions Frame Buffer write access and
transmission of the Frame Buffer content. Both actions can be run in parallel if required
by critical protocol timing.
illustrates the frame transmit procedure by consecutively writing
and transmitting the frame. The frame transmission is initiated writing SLPTR or writing