Frame Buffer Protection (Static/Dynamic)

There are different ways to safely keep the PSDU in the frame buffer without the risk of being overwritten by consecutively received frames.

Static Frame Buffer Protection

Dynamic Frame Buffer Protection

Parameters:
safe_mode enable {1}/disable {0} dynamic frame buffer protection.

PREAMBLE_DETECTOR_DISABLE

One way to protect the frame buffer against overwriting is to disable the preamble detector. This can be achieved by writing value 1 to sub register SR_RX_PDT_DIS, e.g. right after the occurrence of one of the interrupts TRX_IRQ_RX_START (shown in the use case below) or TRX_IRQ_AMI. When the MCU is ready to process more frames, the preamble detector gets enabled by writing the value 0 to the sub register SR_RX_PDT_DIS.

Note:
Disabling the preamble detector can also be applied for monitoring the RF channel parameters (ED, RSSI, CCA) in order to avoid the reception of frames during the measurement.
inline_mscgraph_109
Code example
    /* AT86RF212::[RX_ACTIVE] */
    /* TRX_IRQ_RX_START occurs here */
    trx_bit_write(SR_RX_PDT_DIS, 1);
    delay(tPSDU);
    frame = trx_frame_read();
    trx_bit_write(SR_RX_PDT_DIS, 0);
    /* AT86RF212::[RX_ACTIVE] */

SWITCHING_TO_PLL_ON

The frame buffer can also be protected against overwriting by setting the radio transceiver into state PLL_ON. This can be achieved by writing value CMD_PLL_ON to sub register SR_TRX_CMD, e.g. right after the occurrence of one of the interrupts TRX_IRQ_RX_START (shown in the use case below) or TRX_IRQ_AMI. When the MCU is ready to process more frames, the radio transceiver can be set back to one of the receive states RX_ON or RX_AACK_ON.

inline_mscgraph_110
Code example
    /* AT86RF212::[RX_BUSY] */
    /* TRX_IRQ_RX_START occurs here */
    trx_bit_write(SR_TRX_CMD, CMD_PLL_ON);
    delay(tPSDU);
    /* AT86RF212::PLL_ON */
    frame = trx_frame_read();
    trx_bit_write(SR_TRX_CMD, CMD_RX_ON);
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==RX_ON);
    /* AT86RF212::RX_ON */

SET_PROTECT_DYNAMIC

The dynamic frame buffer protection prevents the overwriting of valid frames until the frame read functions trx_frame_read() or by trx_frame_read_blm() have comleted.

A frame is classified as valid in the Basic Operating Mode (RX_ON) if it has a valid FCS. In the Extended Operating Mode (RX_AACK_ON) a frame is valid if it matches the address filter and has a valid FCS.

The protection is enabled by writing safe_mode=1 to SR_RX_SAFE_MODE and it holds until the end of a frame buffer read access, indicated by /SEL=HIGH.

inline_mscgraph_111
Code example
    /* AT86RF212::[CONFIG] */
    trx_bit_write(SR_RX_SAFE_MODE, safe_mode);

GET_PROTECT_DYNAMIC

Reading the value safe_mode of SR_RX_SAFE_MODE indicates whether the dynamic frame protection is enabled or not.

inline_mscgraph_112
Code example
    /* AT86RF212::[ACTIVE] */
    safe_mode = trx_bit_read(SR_RX_SAFE_MODE);

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