Frame Buffer Empty Indicator

For time critical applications, it may be desirable to read the frame data as early as possible, e.g. right after the occurrence of the interrupt TRX_IRQ_RX_START, as described in the use case PHY_DATA_INDICATION_FAST. In order to avoid a RX underrun interrupt in this situation, the frame buffer empty indication of the radio transceiver can be used.

When using this feature, the TRX_PIN_IRQ is reconfigured to indicate the status of the frame buffer. There are unread data in the frame buffer, if the level of pin TRX_PIN_IRQ is LOW. If the level of pin TRX_PIN_IRQ changes to HIGH, it indicates that there are no more unread data in the frame buffer.

The MCU can now wait until the level of pin TRX_PIN_IRQ changes back to LOW and proceed with reading until either the level changes to HIGH or the number of bytes indicated in the PHR field is read. The latency of the frame buffer empty indicator is t13. After finishing the frame upload with setting /SEL=HIGH, TRX_PIN_IRQ will change automatically its mode back to IRQ functionality and all other pending interrupts, which have occurred meanwhile, will be signalled.

Parameters:
bl_ctrl enable {1}/disable {0} the frame buffer empty indicator.
Note:
In case of an internal receive error (e.g. an unlock of the PLL), the pin TRX_PIN_IRQ remains locked at HIGH level. In order to prevent a deadlock, the MCU should start a timeout counter tBEDead, when the frame buffer empty indicator turns HIGH.
Use Cases:


SET_BUFFER_EMPTY_IND

The frame buffer empty indicator is enabled when writing bl_ctrl=1 to sub register SR_RX_BL_CTRL.

inline_mscgraph_106
Code example
    /* AT86RF212::[CONFIG] */
    trx_bit_write(SR_RX_BL_CTRL, bl_ctrl);

GET_BUFFER_EMPTY_IND

The value of bl_ctrl is retrieved with the following use case:

inline_mscgraph_107
Code example
    /* AT86RF212::[ACTIVE] */
    bl_ctrl = trx_bit_read(SR_RX_BL_CTRL);

USE_BUFFER_EMPTY_IND

The following use case shows, how a frame is read, using the frame buffer empty indicator. Inside the function trx_frame_read_blm() the pin TRX_PIN_IRQ is polled. If it changes the level to HIGH, the function terminates with the current fragment of the frame read. When the level of the pin TRX_PIN_IRQ changes back to LOW, the function trx_frame_read_blm() continues reading the next data of the frame.

inline_mscgraph_108
Code example
    /* AT86RF212::[RX_ACTIVE] && AT86RF212::[RX_BUSY] */
    /* TRX_IRQ_RX_START occurs here */
    /* AT86RF212::[PIN_IRQ == LOW] */
    frame = trx_frame_read_blm();
    /* AT86RF212::[PIN_IRQ == HIGH] && AT86RF212::[PIN_IRQ == LOW] */
    frame = trx_frame_read_blm();
    /* TRX_IRQ_TRX_END occurs here */

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