Go to Post 321 didn't get picked up today because the front desk of the high school wouldn't let him in! Thank goodness the FedEx driver was nice enough to come back and get it for us! - Chuck Glick [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2011, 15:59
Marc P. Marc P. is offline
I fix stuff.
AKA: βetamarc
no team
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Watertown, CT
Posts: 997
Marc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond repute
Send a message via AIM to Marc P.
cRio Kernel Error/Reboots

Hello all!

I'm here asking for advice on behalf of Team Beta's programmers. The other night they were attempting to write some simple code to experiment with an encoder, with some success. Things seemed to be going well until the cRio inexplicably started rebooting itself.

The cRio powers on, boots up, runs the deployed code for just long enough for the classmate/driver station status to show "Teleoperated Disabled" for a split second before showing "No Robot Communication" as the cRio status light blinks on for a second, indicating it restarted.

The programmers are using C++/Wind River, the cRio is running image version 25, WPIlib and the build environments are all updated to the most recent downloadable versions.

My first thought was to format/re-image the cRio. While in the "not functioning properly" state, the cRio imaging tool can not find the cRio for re-imaging. After powering off the main breaker, I flipped the Safe Mode DIP to "on" and turned the breaker back on. The cRio then booted up, and was detected by the imaging tool. From there we were able to successfully format the cRio, and the imaging tool then said to power down, turn off the safe mode switch, and power back on. After doing so, the imaging tool was again able to detect the cRio, and successfully set the IP address and applied the v25 image. The cRio will then boot up fine, the classmate/driver station is able to connect, and the status shows "No Robot Code." It will sit like that for extended periods of time without issue.

The programmers then proceeded to compile and deploy basic sample code with seemingly no issue. Once the deployment finishes, the cRio is rebooted via the "Robot Reboot" button on the classmate/driver station. It again reconnects to the classmate/driver station just long enough for the status to show "Teleoperated Disabled" for a split second before changing back to "No Robot Communication."

With Wind River still open after deploying code, the following error pops up:
Code:
Target Exception

VxWorks6x_10.28.36.2: Exception in Kernel Task FRC-RobotTask:0x12816e0 at pc=0x218682C

Vector 0x300 : Data Access addr=0x992611E8 status=0x21867C0

The System has stopped.  Do you want to attach the debugger now?

(yes)   (no)
Clicking yes opens a tab with scrolling lines saying:
Code:
deadbeef:  Read access not allowed
deadbef0:  Read access not allowed
deadbef1:  Read access not allowed
deadbef2:  Read access not allowed
deadbef3:  Read access not allowed
deadbef4:  Read access not allowed
deadbef5:  Read access not allowed
...and so on
The cRio then continues in it's rebooting loop, after multiple cold boots/power cycles, and the only thing that seems to stop it is booting in Safe Mode, formatting, rebooting in normal mode, and re-imaging. But even that only works until any code is deployed, after which the cycle begins again.

Steps we have tried:

Full power cycles (turning off breaker, unplugging battery, reconnecting, turning breaker back on)
Removing all cRio modules
Formatting the cRio in safe mode
Re-imaging the cRio in normal mode
Blowing out the cRio with compressed air
Deploying default/sample code
Fresh battery

All to no avail. Is there anything else we can try before contacting NI?

Thank you all for any advice or assistance!
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2011, 16:25
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: cRio Kernel Error/Reboots

I don't have time to give a considered reply, so I'll just suggest you look at the code for an uninitialized pointer.
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2011, 18:13
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,846
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: cRio Kernel Error/Reboots

Next time try using the NO APP switch/cRIO reset instead of all that reformatting.
It just sounds like your code is going south and freezing up the cRIO.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2011, 20:25
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: cRio Kernel Error/Reboots

To add to what Mark and Alan are saying, the benefit of C++ is ultimate control over the cRIO. The downside is, bad code results in a reboot. Use NoApp to recover from bad code.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2011, 21:03
Marc P. Marc P. is offline
I fix stuff.
AKA: βetamarc
no team
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Watertown, CT
Posts: 997
Marc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond repute
Send a message via AIM to Marc P.
Re: cRio Kernel Error/Reboots

Thanks guys! The NoApp switch tip will help save us some time troubleshooting.

The programmers mentioned they tried deploying the default non-modified code, as well as code that was known to work earlier in the week with the same result. I'll try a clean installation of Wind River on a separate laptop with the default/sample code when we can get back in to the school tomorrow. We've lost 4 days in the last 2 weeks to snow closures, and have some catching up to do!

Thanks again!
-Marc
Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2011, 22:58
Marc P. Marc P. is offline
I fix stuff.
AKA: βetamarc
no team
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Watertown, CT
Posts: 997
Marc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond repute
Send a message via AIM to Marc P.
Re: cRio Kernel Error/Reboots

The plot thickens...

At our meeting tonight the first thing we tried was booting the cRio with the NoApp switch toggled, and it still rebooted. We powered up the circuit breaker, after 15-20 seconds the classmate status showed "No Robot Code," and a split second later changed to "No Robot Communication." Just before "No Robot Code" appeared, the Robot Signal Light blinked 5 times, then stayed off as the classmate status changed to "No Robot Communication."

After doing the safe mode/format/reboot/re-image/reboot cycle again, we tried loading default/stock tank drive code from a fresh install of Wind River on a different laptop, and the result was the same- code loaded fine, but after the first reboot the same problem occurred, even cold booting with the NoApp switch.

Is there anything else we can try?
Reply With Quote
  #7   Spotlight this post!  
Unread 28-01-2011, 23:19
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: cRio Kernel Error/Reboots

Quote:
Originally Posted by Marc P. View Post
Is there anything else we can try?
At this point, I suggest you try a different cRIO.

Before that, though, check the 24v power and look carefully for metallic debris in the cRIO connectors and inside the chassis. You said you used compressed air, but that won't necessarily clean out sharp crumbs of aluminum.
Reply With Quote
  #8   Spotlight this post!  
Unread 30-01-2011, 20:45
Marc P. Marc P. is offline
I fix stuff.
AKA: βetamarc
no team
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Watertown, CT
Posts: 997
Marc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond reputeMarc P. has a reputation beyond repute
Send a message via AIM to Marc P.
Re: cRio Kernel Error/Reboots

Good news! It turns out it was a code problem, and the cRIO is fine.

The programmers were using the "FRC Sample Simple C Template" in Wind River as the default program, which we found out, the hard way, doesn't work. We're not sure why it's still included, even in fresh installs of Wind River/WPIlib.

After formatting/re-imaging the cRIO again, we created and compiled a new project using the "FRC Simple Robot Template" and it worked perfectly.

Also, in reading the "crio-frc_Operating_Instructions" PDF published by NI-

"The NO APP switch does not affect C/C++ startup applications. You can
use the Undeploy option in Wind River Workbench to disable a C/C++
application."

...which explains why it would continue to reboot while toggled.

Everything is back to normal now. Thank you all!
Reply With Quote
  #9   Spotlight this post!  
Unread 30-01-2011, 22:09
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,846
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: cRio Kernel Error/Reboots

Sorry I'd forgotten the No-App switch didn't apply to C++.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #10   Spotlight this post!  
Unread 30-01-2011, 22:20
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: cRio Kernel Error/Reboots

Thank you for letting us know what you found. The information might help another team with the same problem if they find this thread.
Reply With Quote
Reply


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


All times are GMT -5. The time now is 16:51.

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