hi peppe,

essentially, yes, but you don't return the value per se; just read your data from whichever buffer was last written.

when in doubt, read the code carefully, and give try things out.

-steve

On 05/20/2011 05:18 AM, Peppe Scabellone wrote:
Thank you steve, what you've said has been really useful.
So to get data from dma is enough doing
      call DMA0.repeatTransfer((void*)ADC12MEM0_, (void*)&sbuf1,
NBR_ADC_CHANS);
and returning the sbuf1 value?

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

    hi peppe,

    please take a look at the shimmerAnalogSetup interface, and examples
    of its use in tinyos-2.x-contrib/shimmer/apps under accelgyro.

    to answer your questions, you may use any approach you like to
    converting analog data.  using dma to transfer a/d results to memory
    has several advantages:

    1) it consumes an entire block of code and all of the interrupts
    that the a/d converter generates (one for *each* conversion) in one
    swoop.
    2) it's much faster than handling events and doing manual copies of
    results
    3) it burns a lot less power by virtue of the fact that the module
    allows the msp430 to continues with other operations while the
    transfer is underway
    4) it cleans up your code, and the tinyos task scheduling underneath
    5) people who have been doing this for a long time have already
    written the tools that allow you to make easy, robust choices about
    your application's data flow; use them with confidence!

    i hope that this helps,

    steve


    On 05/20/2011 04:44 AM, Peppe Scabellone wrote:

        Hi everybody,
        I was trying to use Gyro mod to get data from shimmer2r, but all
        examples I've seen used Msp430DmaChannel.
        The question is: Can I use Msp430Adc12MultiChannel, this class is
        simpler than other because has the method getData() that I need to
        capture datas from gyro.
        Using Msp430DmaChannel which advantages do I take?
        Sincerely Peppe.



        _______________________________________________
        Shimmer-users mailing list
        [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