This section describes, how PLL events are handled and how the state of the PLL can be checked. The function of the interrupts TRX_IRQ_PLL_LOCK and TRX_IRQ_PLL_UNLOCK is described in more detail in the AT86RF230 data sheet.
If the TRX_IRQ_PLL_UNLOCK and TRX_IRQ_PLL_LOCK interrupts are enabled and the MCU gets an TRX_IRQ_PLL_UNLOCK interrupt in one of the [PLL_BASIC] states, which is not followed by an TRX_IRQ_PLL_LOCK interrupt within 32 us, a critical error did occur. In this case no transmission and reception of frames is possible. The software should try to execute the sequence PHY_TEST_PLL in order to force the PLL to lock. If the TRX_IRQ_PLL_UNLOCK interrupt occurs during any frame tranmission and reception, these transaction has failed. The higher software layers will be able to handle this error in the same way like a normal tranmission error.
Code example
/* TRX_IRQ_PLL_UNLOCK occurs here */
handle_unlock();