Frame Buffer Empty Indicator

As described in PHY_EVENT_TRX_UR_RX, a frame buffer read executed too fast can cause an TRX_IRQ_TRX_UR. This can be avoided by using the frame buffer empty indicator. For it, pin24 (TRX_PIN_IRQ) can be reconfigured to indicate an empty frame buffer. If the TRX_PIN_IRQ turns HIGH, the microcontroller should interrupt the frame buffer read. It should only continue, if TRX_PIN_IRQ turns LOW again, indicating that enough data has arrived in the frame buffer, so that another SPI access to the frame buffer will be successful. The latency of the indicator is tTR15. After finishing the frame upload, i.e. after /SEL=HIGH, pin24 will change back to IRQ mode again. Thus, all pending interrupts will be signalled then. For more details refer to section 11.7 (Frame Buffer Empty Indicator) of the AT86RF231 datasheet.

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 microcontroller should start a timeout counter tBEDead, when the frame buffer empty indicator turns HIGH.
Use Cases:

SET_BUFFER_EMPTY_IND

Parameters:
bl_ctrl 
  • 0: the frame buffer empty indicator is disabled
  • 1: the frame buffer empty indicator is active
inline_mscgraph_105
Code example
    /* AT86RF231::[CONFIG] */
    trx_bit_write(SR_RX_BL_CTRL, bl_ctrl);

GET_BUFFER_EMPTY_IND

inline_mscgraph_106
Code example
    /* AT86RF231::[ACTIVE] */
    bl_ctrl = trx_bit_read(SR_RX_BL_CTRL);

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 its level to HIGH, the function stops 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_107
Code example
    /* AT86RF231::[RX_ACTIVE] && AT86RF231::[RX_BUSY] */
    /* TRX_IRQ_RX_START occurs here */
    /* AT86RF231::[PIN_IRQ == LOW] */
    frame = trx_frame_read_blm();
    /* AT86RF231::[PIN_IRQ == HIGH] && AT86RF231::[PIN_IRQ == LOW] */
    frame = trx_frame_read_blm();
    /* TRX_IRQ_TRX_END occurs here */

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