Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-31 Thread Xiaohui Liu
Hi, What is *AutoResourceAcquireLayerC* for, to acquire SPI resource? However, isn't SPI resource already accounted for in *CC2420XDriverLayerC*? Wish everyone a happy holiday. -Xiaohui On Mon, Dec 10, 2012 at 6:46 PM, Janos Sallai wrote: > internals -- -Xiaohui Liu TelosB TinyOS 2.1.2 ww

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-10 Thread Janos Sallai
In order to use the radio stack, TEP105, TEP111, TEP125, TEP127, TEP132 and TEP133 all apply. There's no documentation on the internals of the cc2420x driver, nor the rfxlink library, other than the readme files in chips/cc2420x and lib/rfxlink. Janos On Mon, Dec 10, 2012 at 5:23 PM, Xiaohui L

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-10 Thread Xiaohui Liu
Hi Janos, I'm porting my protocol from cc2420 to cc2420x. Is there any documentation on cc2420x besides the source code? Thanks. -Xiaohui On Wed, Dec 5, 2012 at 6:26 PM, Xiaohui Liu wrote: > Hi, > > Once again, thanks very much for your prompt answer. > > How to use FTSP, 32khz and microsecond

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-05 Thread Xiaohui Liu
Hi, Once again, thanks very much for your prompt answer. How to use FTSP, 32khz and microsecond precision, with CC2420X stack? Just "make telosb cc2420x[_32khz]"? -Xiaohui On Wed, Dec 5, 2012 at 6:14 PM, Janos Sallai wrote: > Tasklet -- -Xiaohui Liu TelosB TinyOS 2.1.2 www.cs.wayne.edu/xl

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-05 Thread Janos Sallai
Xiaohiu: Please see my answers below. Janos On Wed, Dec 5, 2012 at 4:24 PM, Xiaohui Liu wrote: > Hi Janos, > > (1) SFD capture is disabled during both transmission and reception. Does > CC2420x timestamping still work if it is enabled? > There are some weird edge cases that we want to avoid.

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-05 Thread Xiaohui Liu
Hi Janos, (1) SFD capture is disabled during both transmission and reception. Does CC2420x timestamping still work if it is enabled? (2) What is *Tasklet* for? If it is used to make code async, then why not just use function call directly? That is, to replace *Tasklet.schedule()* with what is ins

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-04 Thread Janos Sallai
The STXON strobe tells the radio chip to start transmitting a packet. After STXON is issued, the chip transmits the preamble, puts the two SFD bytes on air, reads the length byte from the TX FIFO, transmits it, and reads and transmits the subsequent bytes of the message one by one. That is, it does

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Xiaohui Liu
Hi, Another question: STXON is strobed when header is loaded in TXFIFO, while the payload is loaded later. Why is there no second STXON strobe to transmit the payload? Thanks for your patience. -Xiaohui On Mon, Dec 3, 2012 at 9:44 PM, Xiaohui Liu wrote: > Hi Janos, > > I see. > > I changed th

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Xiaohui Liu
Hi Janos, I see. I changed the timestamping in CC2420 stack accordingly, but occasionally wrong timestamps still pop up. My speculation is that the following corner case is causing problem: __||__||_ As SFD pin activity shown above, a packet transmission ensues

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Janos Sallai
The hardware is fairly deterministic: After issuing the STXON strobe the SFD will be transmitted with a constant delay. It's more efficient to take a timestamp when issuing STXON and adjust it with a constant TX_SFD_DELAY than servicing an SFD interrupt. Janos On Mon, Dec 3, 2012 at 4:10 PM, Xia

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Xiaohui Liu
Hi, Thanks for clarifying the reception timestamping. Why is *TX_SFD_DELAY* accounted for during transmission, but not during reception? Isn't *sfdTime* the time SFD byte has been transmitted so there is no need to add *TX_SFD_DELAY*? * // adjust time32 with the time elapsed since the SFD event*

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Janos Sallai
Xiaohui: Please find my answers below. Are you aware of any case other than failing address recognition that will > cause CC2420 to discard a frame? If not, problem (2) (see > here) > seems

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Xiaohui Liu
Hi Janos, I really appreciate your invaluable clarification. Still a few questions in line. On Mon, Dec 3, 2012 at 9:39 AM, Janos Sallai wrote: > Xiaohui: > > > > (1) What if a frame fails address recognition and is automatically > flushed? How is this case handled? > I avoided this problem by d

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-03 Thread Janos Sallai
Xiaohui: > (1) What if a frame fails address recognition and is automatically flushed? How is this case handled? I avoided this problem by doing the address recognition in software, so there's no automatic flushing. The only thing the driver does is it signals RadioReceive.header(rxMsg), the retur

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-12-02 Thread Xiaohui Liu
Hi Janos, I'm looking at CC2420XDriverLayerP.nc, and I have the following questions: (1) What if a frame fails address recognition and is automatically flushed? How is this case handled? (2) in the function reading the length byte * inline cc2420X_status_t readLengthFromRxFifo(uint8_t* lengthPtr)*

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-21 Thread Janos Sallai
The two stacks differ in how the SFD interrupts are handled on the receiver, and in when the received packet is downloaded from the radio chip's FIFO. The default stack saves the SFD timestamp in a queue. After the SFD interrupt, the default stack waits until the entire packet is received into the

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-20 Thread Janos Sallai
The two stacks differ in how the SFD interrupts are handled on the receiver, and in when the received packet is downloaded from the radio chip's FIFO. The default stack saves the SFD timestamp in a queue. After the SFD interrupt, the default stack waits until the entire packet is received into the

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-19 Thread Xiaohui Liu
Hi, I'm aware of the timing issue in the default CC2420 stack, e.g., timestamping under heavy load as this figure shows. Consequently, FTSP is yielding up to 200 jiffies error when integrated into my protocol which generates heavy tr

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-19 Thread Eric Decker
On Mon, Nov 19, 2012 at 4:21 PM, Xiaohui Liu wrote: > Hi, > > Is it possible that while a packet is being received, another packet > arrives? How does CC2420X stack deal with this case? Thanks. > that would have to stack in the fifo in the cc2420. I'm not sure how the driver and the cc2420 deal

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-19 Thread Xiaohui Liu
Hi, Is it possible that while a packet is being received, another packet arrives? How does CC2420X stack deal with this case? Thanks. On Mon, Nov 19, 2012 at 10:45 AM, Janos Sallai wrote: > The two stacks differ in how the SFD interrupts are handled on the > receiver, and in when the received pa

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-19 Thread Janos Sallai
There is weird bug in the timestamping code in the cc2420 stack. Sometimes packets get timestamps that should be associated with a different packet. A few people tried to fix it, yet unsiccessfully. That was the primary reason why the cc2420x stack was created. Janos On Thu, Nov 15, 2012 at 10:4

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-18 Thread Xiaohui Liu
Hi, According to this figure, there is definitely some bug for timestamping in the default CC2420 radio stack, especially under heavy load. Can you please tell me how timestamping is done in CC2420X and how it avoids the potential bu

Re: [Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-15 Thread Xiaohui Liu
Thanks. Anyone else wants to share some experience implementing microsecond ftsp on TelosB? -Xiaohui Liu On Thu, Nov 15, 2012 at 3:49 PM, Janos Sallai wrote: > You will probably have to change the clock source (change T32khz to > TMicro). I'm not familiar with the code, so I can't tell you wher

[Tinyos-help] microsecond ftsp on TelosB without cc2420x

2012-11-15 Thread Xiaohui Liu
Hi everybody, I'm working on a TDMA protocol which requires high precision, even 32khz ftsp does not work for me. I can get microsecond precision if cc2420x stack is used instead of the default cc2420 based on the discussions like here