Go to Post This thread has officially jumped the shark! the old guy shark :) - IndySam [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2008, 17:33
Ryan O's Avatar
Ryan O Ryan O is offline
FRC Eclipse Plug-in Developer
no team (FRC Eclipse)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Plaistow
Posts: 111
Ryan O is an unknown quantity at this point
Send a message via AIM to Ryan O
Delayed Red Light of Death

Ok, so we had a snow day today, and luckily I brought home the electronics board and such, and was able to program. I had been going at it, and had everything I had done so far working. I left the board on while I coded another section. After a few minutes (5-15?) I hear the click of relays reverting to neutral, and sure enough the lights are orange again. I look at the board, and the red light of death is blinking at me, despite the fact I touched none of the controls, and had no counters or anything that would have made any program flow changes. Any ideas?
__________________
CRUD Name: Windows
Rookie Year: 2005
Alumni to Team: 350
  #2   Spotlight this post!  
Unread 13-02-2008, 17:39
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Delayed Red Light of Death

I really have no idea.... You may want to leave the board on again for a length of time to see if you can replicate the error. If nothing happens, then you're all set, and don't have to worry about it. Or I believe dashboad will allow you to get more descriptive code error reports. (Not sure about that, though. Something does.)
  #3   Spotlight this post!  
Unread 13-02-2008, 19:26
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Delayed Red Light of Death

When I run our code without the sonar unit attached, it runs for about ten seconds and hangs (red lights). Then I disable the sonar code and it runs fine.

So if you can repeat the problem reliably, try disabling sections of code to see if any particular section is making it hang.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #4   Spotlight this post!  
Unread 13-02-2008, 20:43
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Delayed Red Light of Death

You can get the red light of death if there is a branch of your code that takes too long to execute. You can also get it if you are stomping on memory (for example if you keep writing past the end of an array). You can also get it if you generate too many interrupts, take too long to process them, or forget to clear them. If you have too many printfs (writing to the serial port is slow) you can also cause one.

There's probably a lot of other things that can cause it, but those are things to look at.

One last thing to do is check the battery voltage on the OI display before and after the red light of death. There is one (supposedly fixed) bug that causes the battery voltage to display 8.2 or 8.3.

Last edited by Joe Ross : 13-02-2008 at 20:48.
  #5   Spotlight this post!  
Unread 13-02-2008, 21:50
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: Delayed Red Light of Death

1075 has also experienced a RLOD if you have the motor outputs of a victor shorted (by accident) and activate some code that should run that victor.
  #6   Spotlight this post!  
Unread 13-02-2008, 22:09
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: Delayed Red Light of Death

Another possible cause.

Running interrupts? If the proper context isn't saved then it will run almost all the time without a problem until the particular context that isn't saved happens to be in use in user code when an interrupt happens. The longer the code runs, the more chances you'll finally hit the timing needed to make this happen.

For example, PCLAT isn't saved but a computed function call is executed in the interrupt routine which uses the PCLAT AND the interrupt happened to catch the user code doing the same thing and it was partially through loading the registers (for example PCLATH loaded but not PCLAT)... upon returning the user code finishes the computed call and vectors off in some random program memory because the data in PCLAT is left over from the interrupt routine and not what the user code had loaded.

Similar issues can exist with any of the other compiler managed resources.

The easiest way to test this is to load up the save= list will ALL compiler managed resources and see if the code can run longer idling without RLOD.

Code:


save=PROD,TBLPTR,TABLAT, PCLATH,PCLATU,section(".tmpdata"),section("MATH_DATA")
I think that covers them all.

Last edited by dcbrown : 13-02-2008 at 22:14.
  #7   Spotlight this post!  
Unread 13-02-2008, 22:12
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: Delayed Red Light of Death

Quote:
Originally Posted by 1075guy View Post
1075 has also experienced a RLOD if you have the motor outputs of a victor shorted (by accident) and activate some code that should run that victor.
That should cause a voltage drop (brown-out) processor reset. The victor is trying to tie the battery + and - together through a low resistance connection. ouch. Did you lose the victor?
  #8   Spotlight this post!  
Unread 13-02-2008, 22:17
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Delayed Red Light of Death

I've seen this happen to a team that was pushing the limit on fitting their processing within the duration of the 26ms of the slow loop.

They were dropping every other radio packet which wasn't quite enough to fail, but eventually if they ran for a long enough period of time they finally dropped several packets in a row triggering the RLOD.

If it's that it's pretty obvious if you time the duration of your loop.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #9   Spotlight this post!  
Unread 13-02-2008, 23:28
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Delayed Red Light of Death

We got an error very similar to yours by misusing the serial drivers. You sure nothing like that is happening?
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
  #10   Spotlight this post!  
Unread 22-02-2008, 11:30
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: Delayed Red Light of Death

Nope, didn't lose the victor... I don't even think we blew a breaker... it was weird.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Second clock/timer causes red light of death pogenwurst Programming 5 23-01-2008 17:54
red light / blue light ay2b Programming 1 24-01-2007 23:00
Blinking Red Light teh_pwnerer795 Programming 8 21-12-2006 23:13
Interrupt Maximum before the RED light DEATH? Chris_Elston Programming 5 15-02-2006 06:53


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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