The
frame buffer read access primitive, described in
section 4.3.2 (Frame Buffer Access Mode) of the AT86RF212 datasheet, appends three additional bytes after the last PSDU byte, which provide information about the link quality (
rxlqi), the receive signal energy (
rxed) and the RX_AACK and CRC status (
rxstat) of a received frame. Except of the value
rxlqi, all other status bytes can also be retrieved from the registers.
+--- --- ~~~~~~ --- ---+--- --- ---+
| 0 | 1 | |n-1| n |n+1|n+2|n+3|
+--- --- ~~~~~~ --- ---+--- --- ---+
| P | D | |D/F|D/F|LQI|ED |RXS|
+--- --- ~~~~~~ --- ---+--- --- ---+
| | |
|<- SRAM Read Access ->| |
| |
|<------ Frame Read Access ------->|
P : PHR field with PSDU length information
D,F : D = data byte, F = FCS byte (PSDU bytes)
LQI : link quality indication value (rxlqi) for the received frame
ED : energy value (rxed) for the received frame
RXS : RX_STATUS value (rxstat) for the received frame
- Note:
- The RX frame status information is valid after the occurrence of the interrupt TRX_IRQ_TRX_END.
- Return values:
-
| rxlqi | The LQI value of the received frame is a measure for the strength and/or quality of a received frame, which is based on the correlation of multiple symbols during detection. It has a range of {0...255}, where the value 0 is associated with a low signal quality (leading almost always to a frame error), and the maximum value 255 is associated with a high signal quality (leading almost always to a correctly received frame). For a more detailed explanation of the LQI value refer to section 6.8 (Link Quality Indication) of the AT86RF212 datasheet. |
| rxed | The energy detection value of the received frame is the result of an ED measurement, which is automatically started upon detection of a valid SHR (see also section RSSI and ED Measurement). |
| rxstat | The RX_STATUS byte of the received frame, described in table 4-3 (RX_STATUS) of the AT86RF212 datasheet, holds a combination of the sub registers SR_RX_CRC_VALID (rxstat[7]) and SR_TRAC_STATUS (rxstat[6:4]). |
Use Cases:
This sequence shows how the LQI, ED, and RX_STATUS information for a received frame is retrieved with the frame read procedure.
- Code example
frm = trx_frame_read();
flen = frm[0];
rxlqi = frm[flen];
rxed = frm[flen+1];
rxstat = frm[flen+2];
This sequence shows how the LQI value for a received frame is retrieved with the frame read procedure. The other two RX frame status bytes are ignored.
- Code example
-