Adjustment of the Current Channel

PHY_SET_CHANNEL

The channel is set by writing the channel number to the sub register SR_CHANNEL.

Parameters:
channel The channel number which must be in the range 11<=channel<=26. All other values are reserved and must not be used.
Note:
Depending on the state of the radio transceiver, the current channel number and the selected channel number, the sequence may cause a PLL Lock interrupt, which is explained in the section PHY_EVENT_PLL_LOCK / PHY_SET_CHANNEL_LOCK.
inline_mscgraph_7
Code example

PHY_SET_CHANNEL_LOCK

If the channel is set in one of the states [PLL_BASIC], after writing the sub register SR_CHANNEL the TRX_IRQ_PLL_LOCK interrupt is generated, if a channel number which is different from the current channel number, is written to the radio transceiver. This sequence can be used to ensure, that a channel switch was done correctly and the PLL has locked.

inline_mscgraph_8
Code example
    trx_bit_write(SR_CHANNEL, newchan);
    delay_us(150); /* TRX_IRQ_PLL_LOCK occurs within this period */

PHY_GET_CHANNEL

The value from the sub register SR_CHANNEL can be read at any time without affecting any transaction.

inline_mscgraph_9
Code example
    channel = trx_bit_read(SR_CHANNEL);

Generated on Fri Aug 10 16:10:03 2007 for SWPM AT86RF230 Rev. A by  doxygen 1.5.2