I'm a little lazy so I don't want to read through all your code, but...
First make sure you have set the PE5 pin as an input with interrupt
enabled, and that nothing...say the micasb board's light sensor
power control...is also trying to use that pin. And check that those
peripheral interrupts are enabled elsewhere if necessary, see
the relevant ATMEGA manual sections.
Second it looks at first blush that your interrupt routine is correct,
but compare it to other examples by searching for TOSH_SIGNAL
and TOSH_INTERRUPT. Also I'm not sure why you have the
comment and code "// disable interrupts" at the end as I would think
that you might need to re-enable them.
Third I have a working interrupt handler for the timer in:
http://www.etantdonnes.com/Motes/AVR128timers.zip
which might have some exemplar value.
MS
Suresh Mathew wrote:
> Hi,
>
> Due to certain constraints, my project is forced to work on TinyOS1.1.
> My aim is to wake-up the main micro-controller based on an external
> interrupt. PortE's 5th pin is being used as the external interrupt. To
> know if the code is working, I have setup the code in such a way that
> - each time the external interrupt is generated, the yellow and green
> LEDs are supposed to toggle. Also, I have included a timer (ONE_SHOT)
> to the system which makes sure that once the timer fires, the LEDs
> toggle 5 seconds later.
>
> The external interrupt is level triggered; it has been configured such
> that if it's logic 0, then the interrupt is generated. Else if it's a
> logic 1, then no interrupt generated. At present, the external
> interrupt is not being detected. The analog value of the voltage being
> fed into the circuit is 3V (VCC for the ATMEGA128 uC is 3.3V). Could
> you please tell me whether there's anything wrong with the code? Am I
> missing some configuration? How do I know whether PORTE5 is no longer
> a general I/O pin but an external interrupt pin?
>
> I have attached all of the necessary files.
>
> Thanks,
> Suresh
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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