Frame Buffer Protection (Static/Dynamic)

There are different possibilities 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

PREAMBLE_DETECTOR_DISABLE

The frame buffer can be protected against overwriting by disabling the preamble detector of the receiver. 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.

inline_mscgraph_108
Code example
    /* AT86RF231::[RX_BUSY] */
    /* 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);
    /* AT86RF231::[RX_ACTIVE] */

SWITCHING_TO_PLL_ON

When writing CMD_PLL_ON right after TRX_IRQ_RX_START, the radio transceiver will turn to PLL_ON right after the receive procedure is finished, thus preventing the overwriting of the frame buffer. After the frame was uploaded successfully the radio transceiver may return to a receive state again (examplary, the use case below shows a return into RX_ON).

inline_mscgraph_109
Code example
    /* AT86RF231::[RX_BUSY] */
    /* TRX_IRQ_RX_START occurs here */
    trx_bit_write(SR_TRX_CMD, CMD_PLL_ON);
    delay(tPSDU);
    /* AT86RF231::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);
    /* AT86RF231::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. Valid frames are:

The protection is enabled by setting SR_RX_SAFE_MODE. It holds until the end of a frame buffer read access, indicated by /SEL=High.

Parameters:
safe_mode 
  • 0: disable dynamic frame buffer protection
  • 1: enable dynamic frame buffer protection
inline_mscgraph_110
Code example
    /* AT86RF231::[CONFIG] */
    trx_bit_write(SR_RX_SAFE_MODE, safe_mode);

GET_PROTECT_DYNAMIC

Reading SR_RX_SAFE_MODE indicates whether the dynamic frame protection is enabled or not.
Returns:
safe_mode
inline_mscgraph_111
Code example
    /* AT86RF231::[ACTIVE] */
    safe_mode = trx_bit_read(SR_RX_SAFE_MODE);

Generated on Mon Jan 12 18:32:19 2009 for SWPM AT86RF231 by  doxygen 1.5.2