Use Cases:
| vrange | This parameter can be {0,1} and adjusts the range of the parameter vthres. | |
| vthres | This parameter is in the range of {0,...,15} and adjusts the threshold voltage. |
/* AT86RF212::[ACTIVE] */ trx_bit_write(SR_BATMON_HR, vrange); trx_bit_write(SR_BATMON_VTH, vthres);
vbatlow, the TRX_IRQ_BAT_LOW interrupt is generated. It is recommended to mask this interrupt after its first occurrence, 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 power 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 an early indicator for low battery capacity. The battery capacity should be monitored more carefully from this point in time.
/* AT86RF212::[ACTIVE] */ /* TRX_IRQ_BAT_LOW occurs here */ msk = trx_reg_read(RG_IRQ_MASK); msk &=0x7f; trx_reg_write(RG_IRQ_MASK, msk);
/* AT86RF212::[ACTIVE] */ batstat = trx_bit_read(SR_BATMON_OK);
1.5.6