My last question is why Msp430Adc12DMAP dont provide
Msp430Adc12MultiChannel? is this a DMA limitation?

On msp430 the combination ADC MultiChannel + DMA has not been
implemented yet (it's on my TODO list).

I also found that no constant is available to use
Msp430Adc12ClientAutoDMA_RVGC or Msp430Adc12ClientAutoDMAC in
AdcReadClient/AdcReadNowClient/AdcReadStreamClient. Is it on purpose and
why?

The HIL interfaces are platform independent and by default the HIL
clients use  Msp430Adc12ClientAutoRVGC (because they "don't know"
whether they will need the RVG). If you are sure that you don't need
the  internal reference voltage generator, you can save some code with
the switch REF_VOLT_AUTO_CONFIGURE in the header file (it uses a
Msp430Adc12ClientC on the HAL instead).

Currently MultiChannel is provided by Msp430Adc12ClientC only - I will
add the interface for
Msp430Adc12ClientAutoRVGC (if I find time next week).

Jan


On 6/18/07, Oussama Chougna <[EMAIL PROTECTED]> wrote:
Hi phil,


I just want to sample four channels. But to do it like you say:

>acquire resource
>sample 1
>sample 2
>sample 3
>sample 4
>sample 5
>sample 6
>release resource

For each channel i need a seperate config (4 channels = 4 configs). So do i
need one instance of the ADC interface and one of the resource interface,
and reconfigure it during runtime to sample the different channels?


Request()
Configure(1)
Sample1
Configure(2)
Sample2
Etc..
Release()


Or do i need 4 ADC instances and 4 resource instances? Or maybe 4 ADC
instances and one resource instance?


This is a bit confusing for me.

Thank you,


O.Chougna



granted

-----Original Message-----
From: Philip Levis [mailto:[EMAIL PROTECTED]
Sent: vrijdag 15 juni 2007 20:27
To: Oussama Chougna
Cc: 'Nicolas Esteves'; [email protected]
Subject: Re: [Tinyos-help] Multichannel Adc sampling and DMA

On Jun 15, 2007, at 1:46 AM, Oussama Chougna wrote:

> Hi Phil,
>
>
> Are you sure about this:
>
>>              Timer.fired() {
>>              call Channe1One.read();
>>              call ChannelTwo.read();
>>              call ChannelThree.read();
>>              call ChannelFour.read();
>>              call ChannelFive.read();
>>              call ChannelSix.read();
>>              }
>
> Is the first approach only possible with the HIL ADC component
> ADCReadClientC? Because with the (msp430) HAL interfaces the client
> should
> do resource arbitration. (request() , configure() , getData(),
> dataReady() ,
> release() ). So you cannot call getData() of each channel one after
> the
> other in the timer.fired() event?
>

Ah, then what you what to do is

acquire resource
sample 1
sample 2
sample 3
sample 4
sample 5
sample 6
release resource

Basically, for maximum efficiency you don't want the lock (resource)
to go idle. That's why enqueueing all the requests as I showed with
the HIL is desirable. The lock won't be released until the sixth
channel is read.



> Which would you recommend for 100 Hz sampling? (HIL or HAL)

You want to sample all 6 sensors at 100Hz? I'd say try using the HIL
(it's simpler) and if it can't do the job use the HAL. The one thing
to be careful of is that if you let the ADC go idle long enough, it
might power down the voltage reference, which has a 17ms warmup time.

Phil

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

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

Reply via email to