Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RC randomly resets or goes into program mode (http://www.chiefdelphi.com/forums/showthread.php?t=44083)

Tom Bottiglieri 15-02-2006 16:53

RC randomly resets or goes into program mode
 
As the topic says, our RC randomly resets or goes into program mode. I was able to isolate the problem to a group of printf()'s executing every program loop, but it seems to be happening again even with those gone.

We are running Timer 2 to run the ADC (only channel is a 50Hz sampling gyro), Timer 3 for an ultrasonic range finder, and 3 hardware interrupts (2 128ppr encoders and the range finder)

Any ideas? It may be our code is taking too long to execute, but I was under the impression the master processor would totally shut down the system if this happened. And even if that happened, what would cause program mode to trigger?

Matt Krass 15-02-2006 17:08

Re: RC randomly resets or goes into program mode
 
Quote:

Originally Posted by Tom Bottiglieri
As the topic says, our RC randomly resets or goes into program mode. I was able to isolate the problem to a group of printf()'s executing every program loop, but it seems to be happening again even with those gone.

We are running Timer 2 to run the ADC (only channel is a 50Hz sampling gyro), Timer 3 for an ultrasonic range finder, and 3 hardware interrupts (2 128ppr encoders and the range finder)

Any ideas? It may be our code is taking too long to execute, but I was under the impression the master processor would totally shut down the system if this happened. And even if that happened, what would cause program mode to trigger?

Check for dust particles near the RESET/PROG contacts.

Also, try reflashing the Master Code, something may have gotten corrupted. Were you operating in a very low power condition? Sometimes that can make memory in Atmel AVRs corrupt, PICs may have the same affliction. I'd say a Master Code redownload, followed by (not before!) a user code redownload will most likely fix your problem, but I'm not an IFI techy.

KenWittlief 15-02-2006 17:22

Re: RC randomly resets or goes into program mode
 
Is your code sitting and spinning on the done bit of the timers?

while (timer not done yet)
do (nothing)

or something like that?

that would crash your code if its waiting too long.

steven114 15-02-2006 19:04

Re: RC randomly resets or goes into program mode
 
We had this sort of trouble when our serial cable was too long. You might try using a shorter/better one.

Chris_Elston 15-02-2006 23:32

Re: RC randomly resets or goes into program mode
 
We just had this tonight....we didn't have the backup battery plugged in, and the main battery was low. When the motors turned on, it rebooted the CPU.

You don't have the same issues do you?


-


All times are GMT -5. The time now is 01:35.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi