[Tinyos-help] atomic sections in HplMsp430GpioC and BusyWaitMicroC

Jacob Sorber jacob.sorber at gmail.com
Wed Mar 25 13:57:45 PDT 2009


I'm porting a driver for a OneWire bus from tinyos 1.x over to tinyos 2.1
and I'm having some trouble with delays introduced by atomic sections around
every clr/set/makeinput/makeoutput.  Making these calls atomic is costing me
around 10us per call.  The BusyWaitMicroC component basically does the same
thing.  So basically this sequence...


call GeneralIO.makeOutput();
call GeneralIO.clr();
call BusyWait.wait(5);
call GeneralIO.makeInput();
call BusyWait.wait(5);

...takes 50-100us instead of 10-15us.  I can fix this by removing the atomic
sections, but I'm a little worried that I'm going to break something else.
Is there a "proper" way to do this?  I could just make an "non-atomic"
version of these components and wrap them in larger atomic sections, but I
would rather not if someone has solved this problem already.

Thanks,
Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090325/423687b8/attachment.htm 


More information about the Tinyos-help mailing list