1. FIFO and FIFOP are GPIO pins provided by the CC2420 radio. These are status pins, and I believe they're used to indicate data exists in the RX FIFO that can be read out by the microcontroller. The datasheet provides more details.
2. If you haven't toggled the CSN line, and haven't used the SPI bus in any other way, you should be able to safely call continueRead(). CC2420ReceiveP (latest 2.x version), line 213, 218, and 266 do this. If you've toggle the CSN line or done anything else to the SPI bus, you must call beginRead() as demonstrated on line 259. 3. You do need to read out the rest of the bad packet to reach the beginning of the next packet in the RX FIFO. Another option is to flush out the RX FIFO, but then you risk losing any other packet that's in there. Lines 199-233 of CC2420ReceiveP demonstrate beginning to receive a packet, and cases where we don't want or care to receive the full packet because it's bad. Lots of edge cases here, and some I know are broken. -David -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of André Cunha Sent: Wednesday, December 19, 2007 9:58 AM To: TinyOS ML Subject: [Tinyos-help] CC2420ReceiveP RXFIFO.readDone Hello all, I am trying to change the default code in RXFIFO.readDone in TOS2.0. I have some doubts on some parts of the code. I have some basic questions: 1. What is the meaning of the return of the following functions call FIFO.get() and call FIFOP.get()? 2. If I have more than one packet in the FIFO buffer do I use the RXFIFO.continueRead to read the next packet or can I use the RXFIFO.beginRead (without doing the flush)? 3. If I want to discard an bad packet or just one packet that does not fit some requirements (like the address) I need to call the RXFIFO.continueRead with the remaining length of the packet before reading a new one? Right? Thanks for the help. Best Regards André _______________________________________________ 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
