[Tinyos-devel] tmote P3.6 / P3.7 direction
Geoffrey Werner-Allen
werner at eecs.harvard.edu
Thu Jul 3 13:50:01 PDT 2008
On Thu, Jul 3, 2008 at 1:59 PM, David Moss <dmm at rincon.com> wrote:
> What Phil's saying is the PlatformC file gets setup regardless of whether
> or not the serial stack is in the system. In the case where the serial
> stack is not compiled in, then PlatformC will set the pins up properly so
> there's no conflict (assumes the no-USB connected case). Then, when the
> serial stack is present, the PlatformC's settings get overridden so the pins
> are setup correctly to use USB.
>
OK, sorry, I'm still confused. It seems to me that there are four states:
USB connected,disconnected x serial stack present/not present. At least
three of these four states are valid: other than the two obviously useful
ones (USB Y, Serial Y; USB N, Serial N), we have people running MoteLab
experiments who choose not to use the locally attached USB serial device
(which we use for programming), probably because they are snooping packets
on other nodes or logging stuff through a dedicated base station. So USB Y,
Serial N is also a valid state (USB N, Serial Y could also happen I
suppose).
The fact that experiments can be running on USB-attached motes without using
the serial stack means that one can't rely on the presence or absence of the
serial stack to configure the ports properly, since it won't always match
the USB connected state. In fact, if David has explained things correctly
above, then the proposed solution matches the behavior I'm already
observing; the problem is caused when the mote is plugged in to USB but the
serial stack is not present to configure the ports correctly.
(This was always happening when we would program our nodes with erasure "do
nothing" binaries in T1 because they didn't use any of the communication
interfaces and the serial stack wasn't included. However, T1 binaries that
used either the radio stack or the serial port seemed to get the drivers for
both(?), so most experimental binaries were fine. In T2 I believe that the
serial and radio stacks are more separated, so that binaries using only the
radio will not have the serial stack present to configure the ports
properly. Please correct me if I am wrong...?)
Another option is to change the default setting in PlatformC to have the
pins configured as inputs, but IIRC the concern here is that when not
connected to USB this will sink some extra power into the chip and increase
the device power consumption. So it seems like you need to handle the USB
state and serial port setup somewhat independently.
Best,
-gwa-
> -David
>
>
> ------------------------------
>
> *From:* geoffrey.werner.allen at gmail.com [mailto:
> geoffrey.werner.allen at gmail.com] *On Behalf Of *Geoffrey Werner-Allen
> *Sent:* Thursday, July 03, 2008 10:52 AM
> *To:* Philip Levis
> *Cc:* David Moss; tinyos-devel at millennium.berkeley.edu
> *Subject:* Re: [Tinyos-devel] tmote P3.6 / P3.7 direction
>
>
>
> My understanding was that the problem was being caused by the lack of a
> serial stack when USB is present. If the application does not use the
> serial port how do the pins get set up properly, since the "no serial stack"
> defaults are what creates the conflict with the buffer. Am I missing
> something?
>
>
> -gwa-
>
> geoffrey werner-allen :: 617.694.7261 :: www.eecs.harvard.edu/~werner<http://www.eecs.harvard.edu/%7Ewerner>
>
> On Thu, Jul 3, 2008 at 12:37 PM, Philip Levis <pal at cs.stanford.edu> wrote:
>
>
> On Jul 2, 2008, at 5:48 PM, David Moss wrote:
>
> There's nothing wrong with your proposal - except I read the line of emails
> in reverse order, missing the serial stack proposal in the first place. :)
>
> So if the serial stack takes care of it, is there a way to do the flippage
> in a platform independent manner? Maybe through the tmote platform's
> PlatformSerial StdControl.start()/stop()? Or are you thinking of a
> different way
>
>
>
> My assumption was that PlatformInit (PlatformC) would set the pins up for
> when there is no serial stack, and then the serial stack would configure
> them for its own use in a SoftwareInit, and the serial stack's command call
> graph would eventually hit the UART HPL. Would this work?
>
> Phil
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080703/e612a9c9/attachment-0001.htm
More information about the Tinyos-devel
mailing list