Rv: Re: [Tinyos-help] Interrupts and async events question

Adam shiyuan69 at gmail.com
Fri Sep 8 09:16:42 PDT 2006


Thanks for pointing out this. But I have traced UARTReceive.receive up, the
original interrupt is defined as this:

# 55
"C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/msp430/HPLUSART1M.nc"
void  __attribute((wakeup)) __attribute((interrupt(6)))
sig_UART1RX_VECTOR(void)
#line 55
{
  uint8_t temp = U1RXBUF;

#line 57
  HPLUSART1M$USARTData$rxDone(temp);
} 

It should preempt other physical interrupt too  -- Am I right? 

I understand UARTReceive.receive is not interrupt-preemptive, since it is
posted from a task.


-----Original Message-----
From: Philip Levis [mailto:pal at cs.stanford.edu] 
Sent: Thursday, September 07, 2006 9:06 PM
To: Adam
Cc: 'jose m'; tinyos-help at Millennium.Berkeley.EDU
Subject: Re: Rv: Re: [Tinyos-help] Interrupts and async events question

On Sep 7, 2006, at 5:12 PM, Adam wrote:

> Anyway, I am happy to see the rule is clarified: async and atomic will 
> run until completion without any interupt.

This statement is not true. For example, in the atmega128 code, UART
interrupts operate in async context. However, other interrupts can preempt
them.

I exhort you to look at the declaration of the interrupt handlers; from
there it should be clear. There is no more definitive reference than the
code itself.

Phil



More information about the Tinyos-help mailing list