Hi,
You could try something like the following in CC2420ReceiveP:
uint16_t RSSI_Values[SomeNumberDeterminedByLengthofPkt];
async command void CC2420Receive.sfd( uint16_t time ) {
if ( call SpiResource.immediateRequest() == SUCCESS )
sample_RSSI();
...
}
void sample_RSSI(){
call CSN.clr();
for (count=0; count < SomeNumberDeterminedByLengthofPkt; count++)
call RSSI.read(RSSI_Values + count);
call CSN.set();
call SpiResource.release();
}
However this may cause other issues I'm not aware of. The way I understand
this is that the MCU will sample the RSSI register over the bus while the
CC2420 pulls in the data. When the data is fully in the RXFIFO it can be
read out and you have both the packet and multiple RSSI samples. Of course
you'd probably only get a small number of RSSI sample over a 40 byte packet.
I'd be interested to hear your opinion on this Phil.
Regards,
Damien.
On Jan 24, 2008, at 2:58 PM, Octav Chipara wrote:
Hi,
I'm trying to write an application that samples the RSSI register at
high rates and also receives packets. However, it looks like most of
the time the you cannot access the RSSI register due to having a
single resource manager for the entire radio. From the cc2420 manual,
my understanding is that you could both read the RSSI register and
receive a packet at the same time. Is this correct? If so, was anyone
able to do this. I guess you would have to multiple resource managers
for the radio?!
Software reads packets and the value of the RSSI register using a bus
connected to the radio. So you can't read both a packet and the RSSI
register at the same time. Therefore, you can't read the RSSI register at a
rate faster than that determined by the time it takes to read a packet out.
You can always just read the RSSI register continuously and let the radio
hardware drop packets... Note that if it's issuing hardware
acknowledgements, then you can't read the RSSI register while it is in TX
mode (the valid bit in the reading will be low).
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help