Thanks Miklos. I will give it a go. On Mon, May 19, 2008 at 6:00 PM, Miklos Maroti <[EMAIL PROTECTED]> wrote:
> Hi Sarfraz, > > > Basically I want to get an estimate of the noise floor. Therefore, I am > > trying to force the RF230 to give me an estimate of the RF energy on the > > current channel even if there are no packets being received. The > datasheet > > (page 41) mentions that this can be done by writing an arbitrary value to > > PHY_ED_LEVEL register, waiting for 140uS and then reading the register > given > > that the chip is in RX_ON or BUSY_RX state. I am assuming that the radio > > stack does not put the chip in standby or sleep state. Is this correct? > > It depends if you use low power listening or not. I would suggest to > do the following: > > 1. obtain the SPI bus > 2. check first the RX_STATUS register. If it is not in RX_ON state, > then the radio is busy (either sending or receiving or off) and you > should not mess with it. > 3. start your PHY_ED_LEVEL measurement, > 4. wait your 140 uS with a busy loop > 5. get the PHY_ED_LEVEL value you want > 6. you can recheck your RX_STATUS if it is still RX_ON (so that you > did not measure the ED_LEVEL while a transmission is on) > 7. Release the SPI bus > > You should release the SPI bus as soon as possible, but I think it is > not necessary to do any of this in atomic context. > > The other option would be to obtain the value of the rssiClear > variable of RF230LayerP. That contains the averaged noise floor > (updated after each received message). For this you need to modify the > RF230LayerP and export that value via a command. > > Miklos >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
