Hi,

you should be able to find out about the details of RSSI/energy 
detection in the CC2420 datasheet. I would guess (not actually using the 
CC2420 myself) that the RSSI.read function directly accesses the 
register and has to apply some correction on the value it finds there 
whereas the other function just returns the RSSI field of the 
CC2420Packet structure to which correction has already been applied 
before it is stored there by the radio driver.

By the way, if you mean "the detectable energy present on the radio 
channel while the device is neither transmitting nor receiving" when you 
speak of hardware noisefloor then make sure that your radio really isn't 
transmitting or receiving by checking its state, otherwise your results 
might be distorted (if there is not already a function providing you this).

Andreas


wx li schrieb:
> Hi, Mike.
> Thanks for your help!!
> Do you means that :  in ram, the rssi value is stored as a negative 
> number. ( which CC2420Packet returns)
>                                 However, in the register, the rssi 
> value is stored as a positive number(which CC2420Control returns)
> I don't know whether my understanding is correct.
> Besides, I'm curious about how the rssi value is stored in the register.
>
> Thanks
> Nathan
>
>
> On Wed, Mar 24, 2010 at 2:17 AM, Chieh-Jan (Mike) Liang 
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Here is my understanding. The RSSI returned by CC2420 is a
>     negative number. Since CC2420Control returns an unsigned number,
>     it needs to translate the raw RSSI to a positive number. On the
>     other hand, CC2420Packet returns a signed number, so it can just
>     return.
>
>     Mike
>
>     On Mar 23, 2010, at 4:36 AM, wx li wrote:
>
>     > hi,guys.
>     > I am trying to access the hardware noise floor with tinyos-2.x
>     > I am confused about the code in Module "CC2420ControlP.nc"
>     >
>     > event void RssiResource.granted() {
>     >     uint16_t data;
>     >     call CSN.clr();
>     >     call RSSI.read(&data);
>     >     call CSN.set();
>     >
>     >     call RssiResource.release();
>     >     data += 0x7f;
>     >     data &= 0x00ff;
>     >     signal ReadRssi.readDone(SUCCESS, data);
>     >   }
>     >
>     > Here, i don't know why the var data should be added by 0x7F
>     > And, in Module "CC2420PacketC.nc"
>     >
>     > async command int8_t CC2420Packet.getRssi( message_t* p_msg ) {
>     >     return (call CC2420PacketBody.getMetadata( p_msg ))->rssi;
>     >   }
>     >
>     > Here, it just read the rssi value in metadata, and do not plus 0x7f
>     > I've been searching for the answer for a couple of hours. But
>     without luck yet..
>     > Thank you for all your help!
>     >
>     > Regard,
>     > Nathan
>     > 3.23.2010
>     >
>     > _______________________________________________
>     > Tinyos-help mailing list
>     > [email protected]
>     <mailto:[email protected]>
>     >
>     https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to