Hi! On Tue, 10 Mar 2009, Doug Palmer wrote:
> Razvan Musaloiu-E. wrote: >> You should take a look on what happens in TOSBootM.nc. The most probably >> thing that goes wrong is reading from the external flash. Moving around >> the startupLeds() you should be able to figure out what path of code >> is executed. >> >> All the best! >> Razvan ME >> >> > Thanks for the response. > > I've mucked about with TOSBootM.nc. When I first switch on, I can see > TOSBootM run through its sequence and then start the installed program. > When I send a --reboot via the java tools, the system immediately goes > over to the yellow/green leds flashing. I don't think that TOSBoot is > being invoked. I can't see any point in the Deluge code where I would > get that particular pattern, and trying to toggle other leds at the > various points in Deluge seems to not do anything. One thing to check is to see if the call to Voltage.okToProgram is true. That should not generate a continuous blinking though. > netprog_reboot uses the watchdog timer to trigger a reboot. Looking a > little closer, the Atmega 1281 has a different watchdog timer to the > Atmega 128 which can generate interrupts as well as a hard reset. From > various bits of documentation, it also looks like the watchdog isn't > disabled after a reset. I suspect that it's being continuously > reset. However, simply reading MCUSR and disabling the WDT on boot > doesn't seem to work. > Could you check this in a small program that doesn't involve TOSBoot? I briefly looked over the TOSBoot code for AVR and the watchdog timer is not configured in any way. If for Atmega 1281 doesn't disable it upon reboot this couldl cause in infinite loop. Can you try to add wdt_disable() to Hardware.init() from avr/HardwareC.nc and see if it helps? -- Razvan ME _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
