Open tjrendall opened 9 years ago
Which platform are you using?
I'm running it on an AVR atmega256RFR2 and have made it possible to debug using Atmel Studio so I have a more visual development environment than just compiling with a Linux terminal.
@tjrendall is that TARGET=avr-atmega128rfa1
?
@gebart actually, no. I made the changes in the radio folder for avr to replace ATMEGA128RFA1 with ATMEGA256RFR2, wherever I saw it. I already had developed boards with this MCU before attempting to switch to Contiki OS. I build, compile and debug using Atmel Studio.
I suppose it is enough to ensure that the division by 2 is not the last step in the calculation; or, preferably, to cast the variables to a sufficiently large integer type instead of the platform-dependent clock_time_t.
The added parentheses around the lifetime variable reads shouldn't be necessary.
I have found that in:
in the function:
there is a multiplication that does not compile properly on my machine.
on the line:
I have that expiration_time = 0, with non-zero default_lifetime and lifetime_unit.
However, when I add parentheses as so:
expiration_time returns the proper value.
I'd welcome anyone else to check this for themselves. The in-error mode causes continuous (0-interval timers) RPL ICMPv6 DAO messages to be sent, causing major power losses.
Jordan