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)*
* {*
* cc2420X_status_t status;*
*
*
* RADIO_ASSERT( call SpiResource.isOwner() );*
* RADIO_ASSERT( call CSN.get() == 1 );*
*
*
*
*
* call CSN.set(); // set CSN, just in clase it's not set*
* call CSN.clr(); // clear CSN, starting a multi-byte SPI command*
*
*
* // XL: wait till length byte is completely received*
* // wait for fifo to go high*
* waitForRxFifoNoTimeout();*
* *
* // issue SPI command*
* call FastSpiByte.splitWrite(CC2420X_CMD_REGISTER_READ | CC2420X_RXFIFO);*
* status.value = call FastSpiByte.splitRead();*
* call FastSpiByte.splitWrite(0);*
* *
* *lengthPtr = call FastSpiByte.splitRead();*
* *
* // XL: isn't the length byte already read, then what's going on here,
what's the next byte?*
* // start reading the next byte*
* // important! fifo pin must be checked after the previous SPI read
completed*
* waitForRxFifo();*
* call FastSpiByte.splitWrite(0);*
* return status; *
* }*
Thanks and look forward to your explanation.
-Xiaohui
On Thu, Nov 15, 2012 at 3:35 PM, Janos Sallai
<[email protected]>wrote:
> Hi,
>
> > So essentially, ftsp only works with cc2420x stack, not cc2420.
> The cc2420 stack has a timestamping bug, so it won't work well.
>
> > What are the changes to the default cc2420 stack if the fix is to be
> ported to it?
> I can't tell that. I found the cc2420 stack to be very complicated.
> Instead of trying to figure out how to fix the timestamping bug, I wrote a
> complete new stack from scratch.
>
> > I find something under $TOSDIR/platforms/telosa/chips/cc2420x/ and
> $TOSDIR/chips/cc2420x, but not sure which files to look at.
> The file that contains the cc2420x timestamping implementation
> is tos\chips\cc2420x\CC2420XDriverLayerP.nc.
>
>
> > Provided that the fix solves the timestamping issue, what else has to be
> changed to make microsecond ftsp work with cc2420 stack?
> If you can fix the timestamping issue on the cc2420 stack, then FTSP
> should work correctly.
>
> > BTW, can you please also help answer my previous
> > question<http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2012-October/055927.html>
> > related
> to timestamping?
> That question is related to the cc2420 stack, so I can't answer this. I
> more than happy to answer questions related to the cc2420x stack, though.
>
> Janos
>
>
>
>
>
> On Thu, Nov 15, 2012 at 2:12 PM, Xiaohui Liu <[email protected]> wrote:
>
>> Hi,
>>
>> So essentially, ftsp only works with cc2420x stack, not cc2420.
>>
>> What are the changes to the default cc2420 stack if the fix is to be
>> ported to it? I find something under
>> $TOSDIR/platforms/telosa/chips/cc2420x/ and $TOSDIR/chips/cc2420x, but not
>> sure which files to look at.
>>
>> Provided that the fix solves the timestamping issue, what else has to be
>> changed to make microsecond ftsp work with cc2420 stack?
>>
>> BTW, can you please also help answer my previous
>> question<http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2012-October/055927.html>
>> related
>> to timestamping?
>>
>> Your help is sincerely appreciated.
>>
>> -Xiaohui Liu
>>
>>
>> On Thu, Nov 15, 2012 at 2:12 PM, Janos Sallai <
>> [email protected]> wrote:
>>
>>>
>>> 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:48 AM, Xiaohui Liu <[email protected]> wrote:
>>>
>>>> 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<http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2011-April/050745.html>
>>>> and here<http://ftsp%20microseconds%20synchronization%20usign%20telosb/>.
>>>> However, there are many changes of the default cc2420 driver I made, so
>>>> it's much easier for me to stick to cc2420 than to apply all changes to
>>>> cc2420x. Is microsecond-level ftsp implemented on TelosB using default
>>>> cc2420? If not, what changes are necessary to have it? Thanks for any hint
>>>> in advance.
>>>>
>>>> -Xiaohui Liu
>>>>
>>>> _______________________________________________
>>>> Tinyos-help mailing list
>>>> [email protected]
>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>>
>>>
>>>
>>
>
--
-Xiaohui Liu
TelosB
TinyOS 2.1.2
www.cs.wayne.edu/xliu/
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help