hi andrea,

sorry it took awhile to get back to you (travel/meetings), but i sat down to look at this and realized that you uncovered what could be considered a bug; at the very least an oversight on my part.

the msp430 usart uses a register that is shared among bus modes to indicate that rx or tx event completion. the gps driver uses this bus as a uart, and has events that fire when either the tx or rx interrupt flags is set, even though this event is triggered by spi activities to/from the sd card.

anyway, i added a fix to the driver that will prevent interference with the sd driver from the gps driver, and it is now checked into the tinyos-main repository.

all, please pick up this fix:

cd ~/tinyos-main/tos/platforms/shimmer2/chips/fgpmmopa6b

svn update

thanks for your patience, and apologies for the confusion.

-steve


On 05/16/2011 12:45 PM, Andrea Grante wrote:
Hi Steve,
actually my JustFATLogging app breaks with just these two lines in
JustFATLoggingC:

components GpsC as GpsMod;
JustFATLoggingP.Gps           -> GpsMod.Gps;

and of course adding

interface Gps;

and

async event void Gps.NMEADataAvailable(char * data) {}

in the JustFATLoggingP.


I'm not even wiring the GpsInit interface, nor I ever call its init, so
my app doesn't ever access to the GPS.
Can your application, with only such changes, write on the SD card on
your shimmer2r ?

Thanks again, kind regards,
Andrea.

2011/5/16 steve ayer <[email protected] <mailto:[email protected]>>

    hi andrea,

    just adding the hooks for the gps module won't break the app, but
    before you call its init, you must disable the sd stuff, and vice-versa.

    -steve


    On 05/16/2011 06:06 AM, Andrea Grante wrote:

        Hello Steve,
        thank you for your help.
        I already tried to call the init() on the GPS, then getting the
        data,
        disabling it by calling either disable() or disableBus(),
        without success.
        Anyway, if you just add in JustFATLoggingC

        {
        ...

           components GpsC as GpsMod;
           JustFATLoggingP.GpsInit       -> GpsMod.Init;
           JustFATLoggingP.Gps           -> GpsMod.Gps;

        ...
        }


        and in JustFATLoggingP

        {
        ...
             interface Gps;
             interface Init as GpsInit;
        ...
             async event void Gps.NMEADataAvailable(char * data) {}
        ...
        }

        the app stops working. It's enough to add those lines, without
        enabling/initializing the GPS module.
        When the shimmer2r is undocked, the three leds turn on, and when
        docked
        back, the control of the mote is lost and nothing is written on
        the SD card.
        Is there something wrong in my code?
        Thank you again, regards,
        Andrea.

        2011/5/12 steve ayer <[email protected]
        <mailto:[email protected]> <mailto:[email protected]
        <mailto:[email protected]>>>


            hi andrea,

            the sd card and the gps daughter card use the same usart bus
        on the
            shimmer, so to use the two together, you'll have to cache
        gps data
            while the sd card is disabled, then stop receiving data from
        the gps
            (though i would not disable it), bring up the sd card, write
        your
            data, then switch back.  bus multiplexing...

            i hope that this helps,

            steve


            On 05/12/2011 09:15 AM, Andrea Grante wrote:

                Hello,
                I'm a master student and I'm trying to write an application
                which stores
                data from the GPS expansion on the SD card.
                Although I use applications which store data on the SD card
                succesfully
                (like JustFATLogging, for instance), I'm having problems
        using
                the GPS
                module in the same apps.
                Even if I just list the GPS component in the
        configuration file (not
                even calling its init() ), SD card storage stops working.
                How could I make the GPS and SD modules work together?
                Thank you so much for your help, regards,
                Andrea Grante.



                _______________________________________________
                Shimmer-users mailing list
        [email protected]
        <mailto:[email protected]>
        <mailto:[email protected]
        <mailto:[email protected]>>

        https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users



_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to