The off by one is pretty strange.

Please report back here if you figure out why.  That would be good to have
archived.


On Mon, Jun 21, 2010 at 6:18 AM, James Millar <[email protected]> wrote:

> Thank you Michael and others.  That's the information I was looking for.
>
>  ...The interrupt vectors for the 1281 are in iomxx0_1.h, and after
> searching, I can't figure out why the numbers are off by one either.  I'll
> have to dig deeper!
>
> Thanks again Michael.
>
> -james
>
> -----Original Message-----
> From: Michael Schippling [mailto:[email protected]]
> Sent: Friday, June 18, 2010 4:05 PM
> To: James Millar
> Cc: [email protected]
> Subject: Re: [Tinyos-help] background on how interrupts invoke nesc code
>
> The interrupt vectors are defined in:
>    /usr/local/avr/include/avr/iom128.h
> but the numbers are off-by-one for some reason.
> TWI and TWO_WIRE are there too...although I had
> some trouble following your question's path
> from ADC to there...
>
> Other interesting tidbits can be found in the
> compiler header files as well.
>
> MS
>
>
> James Millar wrote:
> > Hello,
> >
> >
> >
> > I know the snippet of code below in Tinyos 1.x
> > /tos/platform/atm1281/HPLADCM.nc is marked for being registered as an
> > interrupt.  I'm trying to understand how the software knows to run this
> > piece of code when the ADC Conversion is complete.  The ADC part of
> > SIG_ADC is listed in the Atmel 1281 datasheet (pg 106) as the name of
> > the interrupt vector that signals a conversion is complete, however,
> > when I search source code info on the TWI interrupt vector, there is no
> > SIG_TWI in the nesc code, but instead SIG_2WIRE_SERIAL, and nothing to
> > map 2WIRE_SERIAL to TWI.
> >
> >
> >
> > So how does TOSH_SIGNAL(SIG_ADC) get associated with the ADC conversion
> > complete interrupt vector?  Which file has this information?  I'm just
> > teaching myself by walking through sample code.
> >
> >
> >
> >   TOSH_SIGNAL(SIG_ADC) {
> >
> >     uint16_t data = inw(ADCL);
> >
> >     data &= 0x3ff;
> >
> >     sbi(ADCSRA, ADIF);
> >
> >     cbi(ADCSRA, ADEN);
> >
> >     __nesc_enable_interrupt();
> >
> >     signal ADC.dataReady(data);
> >
> >   }
> >
> >
> >
> > -James
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to