[Tinyos-help] CC2420Config.syncDone() may not get called after
sync() return SUCCESS
Tie Luo
tieluo at gmail.com
Wed Oct 25 09:32:45 PDT 2006
If radio is busy, I think CC2420Config.sync will fail, or may return SUCCESS
and signal syncDone at some time later. I do not understand what you said
"if sync were to never signal done, then it is unlikely that the radio is
receiving/transmitting packets." Did you mean if syncDone is not signalled,
then radio is likely to be free? I am confused since free radio should be
easier for switching channels.
For the tests you mentioned before, I found some channels can be switched to
while some cannot. But I had not run thorough tests on all channels.
The bug that I mentioned, and has been fixed by Tinyos team, is in
CC2420ControlP.nc line 273, SyncResource.release() is added.
Answering your last question, I am not using SPI for other things like large
storage op; what I am doing is purely radio communications and computations.
Rgds,
Tie
On 10/25/06, Philip Levis <pal at cs.stanford.edu> wrote:
>
>
> Tie,
>
> Did you run the tests I mentioned on the list? Or this part of that?
>
> CC2420Config.sync is a split-phase operation; it might signal
> completion a little while later, especially if there is contention
> for the SPI bus. However, if sync were to never signal done, then it
> is unlikely that the radio is receiving/transmitting packets. Which
> not releasing resource bug are you referring to?
>
> Are you using the SPI bus for anything else? E.g., large storage
> operations?
>
> Phil
>
> On Oct 25, 2006, at 2:11 AM, Tie Luo wrote:
>
> > if (call CC2420Config.sync()==SUCCESS) var=1;
> > ....
> > and in RadioConfig.syncDone(error_t err) I reset var=2 regardless
> > of the value of err.
> >
> > However, sometimes the var is always 1, even if I check var
> > periodically.
> >
> > This shows syncDone may not be called. Is that a bug? I recall
> > previously a similar bug (not releasing resource) has been fixed.
> > Is this a similar problem?
> >
>
--
Regards,
Tie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061026/4c1dde0f/attachment.htm
More information about the Tinyos-help
mailing list