Buffer Underrun Interrupt


PHY_EVENT_TRX_UR_TX

If the interrupt TRX_IRQ_TRX_UR occurs during a frame transmission, it indicates a frame buffer write access violation. This may happen when a frame buffer write process is started after the transmission was initiated (see PHY_DATA_REQUEST_PINSTART, PHY_DATA_REQUEST_REGSTART, PHY_DATA_REQUEST_TX_ARET) and the SPI transfer speed is lower than the on-air data rate of the radio transceiver. In this case, the frame buffer read pointer moves beyond the frame buffer write pointer, which is controlled by the trx_frame_write function. If an TRX_IRQ_TRX_UR occured, the entire transmit transaction has to be repeated because the transmit data are invalid. If the SPI data rate of the system is generally lower then the on-air data rate of the radio transceiver, the entire frame has to be downloaded before the transmission is initiated.

Note:
Even if an TRX_IRQ_TRX_UR occurs during transmission, an TRX_IRQ_TRX_END will be generated. The radio will transmit the actual contents of the frame buffer.
inline_mscgraph_66
Code example
    /* AT86RF212::[TX_BUSY] */
    trx_frame_write(len(frm), frm);
    /* TRX_IRQ_TRX_UR occurs here */
    /* MCU::ISR */
    cause = trx_reg_read(RG_IRQ_STATUS);
    /* MCU::ISR_TXUR */

PHY_EVENT_TRX_UR_RX

If the interrupt TRX_IRQ_TRX_UR occurs during a frame reception, it indicates a frame buffer read access violation. This may happen during a frame buffer read access if:

Note:
RX underrun interrupts can be avoided, if the frame buffer empty indicator is used.
inline_mscgraph_67
Code example
    /* AT86RF212::[RX_BUSY] */
    frm = trx_frame_read();
    /* TRX_IRQ_TRX_UR occurs here */
    /* MCU::ISR */
    cause = trx_reg_read(RG_IRQ_STATUS);
    /* MCU::ISR_RXUR */

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