Eric,

This actually has nothing to do with the standard interfaces. In fact,
this reconfiguration is absolutely under the hood. Here it is,
explained a bit more in detail:

Currently, the DCO is used as a clock source for MCLK, and MCLK/4 is
the source for SMCLK. TimerA is driven by SMCLK without prescaling.
The SPI clock is SMCLK/2, which is 500kHz. By reprogramming the clock
subsystem such that MCLK without prescaling is used for SMCLK, and
using a prescaler of 4 to drive the 1uis clock (SMCLK/4), the SPI
clock speed will jump to 2MHz. This way, the radio stack (and other
SPI-limited operations) will be _much_ faster.

The SFD pin of the CC2420 is connected to pin on the MSP430 that can
capture timer/counter B but not timer/counter A. Therefore, to be able
to timestamp with the microsecond clock, timer B must be clocked at
1uis, and timer A should be programmed as the 32kHz clock. (Currently,
timer A is running at 1uis, and timer B at 32kHz.)

I'd really appreciate if you could comment on this. Can you think of a
particular reason why SMCLK was set to MCLK/4? Would it break anything
if the clocks were set up as described above? We did use this setup in
a live deployment, a fairly complex application that used the SPI bus,
serial, I2C, had multihop routing, periodic timers, allowing the mcu
to sleep, etc.

One potential difference from the original clock setup is that in this
case we are left with only 3 timer compare interfaces for the
32khz/1mis clocks, versus 7 in the original case. But since the 1mis
clock is virtualized, this should not be a limitation.

Janos


On Mon, Apr 18, 2011 at 1:42 PM, Eric Decker <[email protected]> wrote:
>
>
> On Mon, Apr 18, 2011 at 8:27 AM, Janos Sallai <[email protected]>
> wrote:
>>
>> Hey Markus,
>>
>> The reason why I have only checked in the micaz version of the cc2420x
>> stack is that the telos timer subsystem must be reconfigured
>> "significantly" in order for the microsecond timestamping to work.
>
> If you are using standard interfaces that may be true.  But the TelosB h/w
> timer is actually ticking at 1uis (binary microsecond ticks).    The main
> mis
> (binary millisecond) timer is being clocked off a 32KiHz clock.   The main
> clocks are shut down when the cpu goes to sleep.
>
>>
>> Specifically, we have to make sure two things: a) the SPI bus is fast
>> enough to download from/upload to the FIFO in real time, and b) that
>> the SFD is captured by the microsecond counter (vs. the asynchronous
>> 32khz counter).
>>
>> I have the code for this in tinyos-2.x-contrib/vu. Specifically, the
>> code that configures the timer subsystem in is tos/msp430, and the
>> altered timer map is in platforms/telosa.
>>
>> RADIO_ALARM_MICROSEC can safely be set to 1, since the mote runs close
>> to 4MHz, which when prescaled by 4 will give a microsecond timer (and
>> alarm, therefore). For the same reason, RADIO_ALARM_MILLI_EXP  should
>> be set to 10.
>>
>> Janos
>>
>>
>> On Fri, Apr 15, 2011 at 5:04 AM, Markus Becker
>> <[email protected]> wrote:
>> > Hello,
>> >
>> > I was checking out rfxlink and whether it works on TelosB nodes. I
>> > didn't see
>> > support in the repository nor someone working on it on the mailing list.
>> >
>> > So I got started with it and wired things together for TelosB:
>> > http://www.comnets.uni-bremen.de/gitweb/?p=mab-tinyos-
>> > main.git;a=commit;h=3df542e639efcaea007127b28691d45c99768bf9
>> >
>> > rfxlink/TestTransmit compiles for telosb now at least.
>> >
>> > I don't know how to calculate the values for RADIO_ALARM_MICROSEC and
>> > RADIO_ALARM_MILLI_EXP   , though. Would someone advise me please?
>> >
>> > BR,
>> > mab
>> >
>> > ------------------------------------------------
>> > | Dipl.-Ing. Markus Becker
>> > | Communication Networks
>> > | Mobile Research Center
>> > | TZI - Center for Computing Technologies
>> > | University Bremen
>> > | Germany
>> > ------------------------------------------------
>> > _______________________________________________
>> > 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
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
>
>
>

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

Reply via email to