[Tinyos-help] Re: help using MSP430Adc12MultiChannel
Jan Hauer
hauer at tkn.tu-berlin.de
Tue Sep 4 01:30:16 PDT 2007
On 9/3/07, John Griessen <john at ecosensory.com> wrote:
> I made a component that reads three channels, and I can't get configure
> to return SUCCESS yet. If you would take a look and see if youspot
> anything, or suggest a debugging method, I would appreciate it.
In Boot.booted() you call configure, but you need to reserve access to
the ADC before, via a to call Resource.request(). The chain of
commands (where * means zero or more times) is:
Resource.request() -> configure() -> ( getData() -> dataReady() )* ->
Resource.release()
Jan
>
> For debugging, I just turn on leds to see what places the program runs.
>
> There is a module for a sensorboard that just is a wrapper for
> MSP430Adc12MultiChannel without using a generic module. I use it
> in a sensorboard dir called ch12Adc containing:
> http://www.ecosensory.com/ch12Adc.h
> http://www.ecosensory.com/ch12AdcP.nc
> http://www.ecosensory.com/ch12AdcC.nc
>
> I run a test program from a dir called Testch12Adc containing:
> http://www.ecosensory.com/Testch12AdcC.nc
> http://www.ecosensory.com/Testch12AdcP.nc
> Makefile with COMPONENT=Testch12AdcC SENSORBOARD=ch12Adc
>
> Testch12AdcP.nc has a Boot.booted event that does
> AdcConfigure.getConfiguration()
> then ch12Adc.configure(defaultconfig, memctl, numMemctl, buffer,
> bufferlen, jiffies)
>
> and in the module for Msp430Adc12MultiChannel as ch12Adc
> I turn on leds at the getConfiguration() command and at the
> start of ch12Adc.configure, but the program does not go to
> the line where that call == SUCCESS.
>
> Any ideas for simplifying the configure some way until it works
> or better debug methods will be appreciated. It is very close to the
> partial code sent by Nicolas Esteves 3aug07
>
>
> John Griessen
>
>
>
> --
> Ecosensory
> tinyOS devel on: ubuntu Linux; tinyOS v2.0.2; telosb ecosens1
>
>
>
More information about the Tinyos-help
mailing list