The following sequences are defined:
vrange | This parameter can be (0,1) and adjusts the range of the parameter vthres. | |
vthres | This parameter has a range from 0...15 and adjusts the threshold voltage. |
trx_bit_write(SR_BATMON_HR, vrange); trx_bit_write(SR_BATMON_VTH, vthres);
ubatlow
, the TRX_IRQ_BAT_LOW interrupt is generated. It is recommended to mask this interrupt after its first occurence, because otherwise an IRQ flood can happen. This interrupt should not be reenabled before the voltage threshold is reprogrammed or the power supply has stabilized.Due to the variable current consumption of the radio transceiver in different states, it may happen, that after an TRX_IRQ_BAT_LOW interrupt the sequence PHY_GET_BATMON_STATUS returns with OK. Nevertheless the IRQ should be interpreted as a signal, that the battery capacity starts to become low and should be monitored more carefully from this point in time.
/* TRX_IRQ_BAT_LOW occurs here */ msk = trx_reg_read(RG_IRQ_MASK); msk &=0x7f; trx_reg_write(RG_IRQ_MASK, msk);
batstat = trx_bit_read(SR_BATMON_OK);