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();
> }
>
> rather than:
>
> ChannelOne.readDone() {
>
> call ChannelTwo.read();
> }
>
> ChannelTwo.readDone() {
> call ChannelThree.read();
> }
>
> The latter gives the OS flexibility in how to schedule the
I/O
> operations. One thing we've been talking about in core is
how > TinyOS
> can best optimize for energy efficiency through intelligent
I/O
> scheduling.
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?
Which would you recommend for 100 Hz sampling? (HIL or HAL)
Thank you.
Chougna
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Philip
Levis
Sent: donderdag 14 juni 2007 19:23
To: Nicolas Esteves
Cc: [email protected]
Subject: Re: [Tinyos-help] Multichannel Adc sampling and DMA
On Jun 14, 2007, at 6:19 AM, Nicolas Esteves wrote:
> Hi,
>
> Is there a particular reason for the multi channel sampling methods
> to be unavailable in the AdcReadClient/AdcReadNowClient/
> AdcReadStreamClient whereas these methods are implemented in
> Msp430Adc12Impl. Is is for portability?
Yes. The assumption is that you're using multi-channel sampling, you
can use the chip-specific HAL.
> I also found that no constant is available to use
> Msp430Adc12ClientAutoDMA_RVGC or Msp430Adc12ClientAutoDMAC in
> AdcReadClient/AdcReadNowClient/AdcReadStreamClient. Is it on
> purpose and why? My last question is why Msp430Adc12DMAP dont
> provide Msp430Adc12MultiChannel? is this a DMA limitation?
I'd defer to the implementers, but my guess is it's just that not
every piece of hardware functionality currently has a software
implementation. For example, on the atmega128, there aren't drivers
for PWM.
>
> I would like to sample 6 Adc12 channels and store them before
> sending data by radio so I thought that creating a component which
> does the same thing than Msp430Adc12DMAP does but with MultiChannel
> and then linking it into Msp430Adc12AutoDMA_RVGC, so is this a good
> idea or should i continue with sampling the channels separately?
It's up to you; if you really need to optimize for efficiency,
chances are you want to set up the DMA for multichannel. If the extra
time to sample the sensors one by one is OK, then it might not be
worth the effort to write the driver. One note: if you are going to
sample 6 channels, then it's a good idea to write code like this:
Timer.fired() {
call Channe1One.read();
call ChannelTwo.read();
call ChannelThree.read();
call ChannelFour.read();
call ChannelFive.read();
call ChannelSix.read();
}
rather than:
ChannelOne.readDone() {
call ChannelTwo.read();
}
ChannelTwo.readDone() {
call ChannelThree.read();
}
The latter gives the OS flexibility in how to schedule the I/O
operations. One thing we've been talking about in core is how TinyOS
can best optimize for energy efficiency through intelligent I/O
scheduling.
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