Reset

Use Cases:

POWER_ON_RESET

The following programming sequence should be executed after power-on to completely reset the radio transceiver. The MCU can not count on CLKM before finalization of this sequence.

Nevertheless, this sequence can be safely executed from any state.

If the Awake Interrupt is explicitely enabled before writing CMD_TRX_OFF, the interrupt occurs, when the radio transceiver has reached the state TRX_OFF.

Note:
It is recommended but not mandatory to use the Awake Interrupt. Instead, a timer can be used to wait until state TRX_OFF is reached.
Parameters:
clkrst A constant with value 0x19, which represents
inline_mscgraph_4
Code example
    /* AT86RF212::P_ON */
    trx_pinset_slptr(0);
    trx_pinset_reset(1);
    delay_us(400);
    trx_pinset_reset(0);
    delay(t10);
    trx_pinset_reset(1);
    trx_reg_write(RG_TRX_CTRL_0, clkrst);
    trx_reg_write(RG_TRX_STATE, CMD_FORCE_TRX_OFF);
    delay(tTR13);
    /* AT86RF212::TRX_OFF */
    state = trx_bit_read(SR_TRX_STATUS);
    ASSERT(state==TRX_OFF);

TRX_RESET

This routine will bring the radio transceiver into a known state, e.g. in case of a fatal error. The use case assumes, that the radio transceiver is in one of the [ACTIVE] states and will do a reset, so that all registers get initialized with their default values.

Because after reset, the interrupt TRX_IRQ_AWAKE_END is disabled, it needs to be explicitely enabled by writing the RG_IRQ_MASK register.

Note:
It is recommended but not mandatory using the TRX_IRQ_AWAKE_END. Instead, a timer can be used to wait until state TRX_OFF is reached.
inline_mscgraph_5
Code example
    /* AT86RF212::[ACTIVE] */
    trx_pinset_reset(0);
    trx_pinset_slptr(0);
    delay(t10);
    trx_pinset_reset(1);
    trx_reg_write(RG_IRQ_MASK, TRX_IRQ_AWAKE_END);
    delay(tTR13);
    /* AT86RF212::TRX_OFF */
    state = trx_bit_read(SR_TRX_STATUS);
    ASSERT(state==TRX_OFF);

STATE_MACHINE_RESET

This command sequence is executed in order to reset the state machine of the radio transceiver to state TRX_OFF. With this procedure any transaction in progress (e.g. if the radio transceiver is in one of the [BUSY] states) is canceled immediately.

All other register values (channel, power, ...) of the radio transceiver will not be affected by this procedure.

The state machine reset is identical to the procedure described in PHY_FORCE_[ACTIVE]__TRX_OFF.

Note:
Alternatively, it is possible to use CMD_FORCE_PLL_ON as described in PHY_FORCE_[ACTIVE]__PLL_ON. In contrast to CMD_FORCE_TRX_OFF this command does not disable the PLL and the analog voltage regulator AVREG.
inline_mscgraph_6
Code example
    /* AT86RF212::[ACTIVE] */
    trx_pinset_slptr(0);
    trx_bit_write(SR_TRX_CMD, CMD_FORCE_TRX_OFF);
    delay(tTR12);
    /* AT86RF212::TRX_OFF */
    trxstat = trx_bit_read(SR_TRX_STATUS);
    ASSERT(trxstat==TRX_OFF);

Generated on Mon Aug 17 13:34:59 2009 for SWPM AT86RF212 by  doxygen 1.5.6