Hi, What I found in the tos/sensorboards/sensorboard.h is a TOSH_ALIAS_PIN(TONE_DECODE_ SIGNAL, INT3)
Hi Antonio, I did not find what you mentioned in that file. Is it under tos/sensorboards ? Thanks! Shawn On Wed, Oct 19, 2011 at 12:11 PM, antonio rosa < antoniorosarodrig...@gmail.com> wrote: > Hi, > > Moteworks provides a function that management the interrupts: > TOSH_SIGNAL(SIG_INTERRUPT) { } when SIG_INTERRUP is a label defined on a > sensorboard.h > > > 2011/10/19 dong bo <shawndon...@gmail.com> > >> Hi Micheal, >> >> Thanks for your reply. Actually, I am working on the tone detection part, >> and the interrupt response seems very strange. The following is my original >> code for this part, and I can see that the interrupt is coming continuously. >> But when I probe the INT3 pin using an oscilloscope, I found the hardware is >> working fine. I suspect the interrupt part is not working fine. >> >> By the way, I am using the environment of Moteworks downloaded from Xbow >> website. Thanks a lot! >> >> command result_t StdControl.init() >> { >> call RadioControl.init(); >> call HPLUART.init(); >> call Leds.init(); >> call Serial.SetStdoutSerial(); >> >> call MicControl.init(); >> call Mic.muxSel(1); >> call Mic.gainAdjust(64); >> >> return SUCCESS; >> } >> >> command result_t StdControl.start() >> { >> call RadioControl.start(); >> call MicControl.start(); >> call MicInterrupt.enable(); >> return SUCCESS; >> } >> >> command result_t StdControl.stop() >> { >> call RadioControl.stop(); >> call MicControl.stop(); >> return SUCCESS; >> } >> >> async event result_t MicInterrupt.toneDetected() >> { >> call MicInterrupt.disable(); >> call Leds.redToggle(); >> >> TOSH_uwait(5000); >> call MicInterrupt.enable(); >> __nesc_enable_interrupt(); >> return SUCCESS; >> >> } >> >> >> On Tue, Oct 18, 2011 at 12:46 PM, Michael Schippling >> <sc...@santafe.edu>wrote: >> >>> We would have to look at your code, but most likely you >>> are not returning from the interrupt correctly. >>> >>> MS >>> >>> dong bo wrote: >>> >>>> I am trying to implement the tone detector software in a Mica2 motes >>>> with MTS310 sensor cards. The current problem is that as soon as the >>>> interrupt is triggered, the system would crash. I triggered green LED to >>>> toggle every a while and red LED will be toggled in the interrupt callback >>>> function. As soon as there is a sound, red LED will be toggled, and green >>>> LED will not be blinking at more, and there will be no more response from >>>> the system. Does anyone know about this? >>>> >>>> Thanks in advance! >>>> Shawn >>>> >>>> >>>> ------------------------------**------------------------------** >>>> ------------ >>>> >>>> ______________________________**_________________ >>>> Tinyos-help mailing list >>>> Tinyos-help@millennium.**berkeley.edu<Tinyos-help@millennium.berkeley.edu> >>>> https://www.millennium.**berkeley.edu/cgi-bin/mailman/** >>>> listinfo/tinyos-help<https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help> >>>> >>> >> >> _______________________________________________ >> Tinyos-help mailing list >> Tinyos-help@millennium.berkeley.edu >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> > >
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help