After the reset, the hardware identification data are read. All interrupts will be disabled (RG_IRQ_MASK = 0) and a dummy read of the register RG_IRQ_STATUS is done, in order to avoid the occurence of unhandled interrupts, before the chip is started. In the case, that the radio transceiver is in state P_ON, when this sequence is executed, the state TRX_OFF is reached typically 510 us (refer to AT86RF230 data sheet) after CMD_TRX_OFF is written to the sub register SR_TRX_CMD.
delay_us(510);
trx_pinset_reset(0);
trx_pinset_slptr(0);
delay_us(6);
trx_pinset_reset(1);
pn = trx_reg_read(RG_PART_NUM);
vn = trx_reg_read(RG_VERSION_NUM);
mid0 = trx_reg_read(RG_MAN_ID_0);
mid1 = trx_reg_read(RG_MAN_ID_1);
trx_reg_write(RG_IRQ_MASK, 0);
irqs = trx_reg_read(RG_IRQ_STATUS);
trx_bit_write(SR_TRX_CMD, CMD_TRX_OFF);
delay_us(510);
state = trx_bit_read(SR_TRX_STATUS);
ASSERT(state==TRX_OFF);
1.5.2