[Tinyos-help] Bug In Arithmetic Ops

Federico Fiorentin f.fiorentin at gmail.com
Wed Nov 21 13:21:46 PST 2007


> Are you sure that you have no warning like "non-atomic read or write"?
I'm sure, there is right use of atomic statement.

David, you said that it normal this behavior.
isn't there any solution for this problem?

You said that msp430-gcc's use of the multiply instruction is broken :-(Does
this affect normal subtraction too?

I'm very surprised that MSP430 has problem in normal arithmetic operation
like add,sub...


2007/11/20, David Gay <dgay42 at gmail.com>:
>
> On Nov 20, 2007 2:59 PM, Christophe Braillon
> <christophe.braillon at inrialpes.fr> wrote:
> > Are you sure that you have no warning like "non-atomic read or write"?
> > It would be really surprising if the hardware or compiler had bugs on
> > that kind of basic operation...
>
> For msp430-gcc, this would alas be less surprising than it should be -
> the -mdisable-hwmul option (disable use of hardware multiply) is used
> in the Makefile because msp430-gcc's use of the multiply instruction
> is broken :-( (and has been for years)
>
> David Gay
>
> >
> > Federico Fiorentin a écrit :
> >
> > > Bug In Arithmetic Ops
> > >
> > > I'm developing a synchronization algorithm for Tmote Sky in TinyOS2
> > > with a Poller and 2 Clients.
> > > The poller sends periodically a Request Packet, and the clients reply
> it.
> > >
> > > In the Reply packet there's:
> > >  the Request Packet receive timestamp (TS) ,
> > >  a time value (TV) always inferior the timestamp
> > >  and them difference (TS - TV).
> > >
> > > I found out that the subtraction evaluated by the mote isn't always
> > > correct, sometimes it diverge of 1,2,4,8.... it seems that the mote
> > > doesn't calculate correctly when it's stressed.
> > >
> > > Any suggestion is welcome.
> > >
> > > Thanks,Regards.
> > >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Tinyos-help mailing list
> > > Tinyos-help at Millennium.Berkeley.EDU
> > >
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at Millennium.Berkeley.EDU
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20071121/7ed09a38/attachment.html


More information about the Tinyos-help mailing list