Go to Post Ban the ingredients for cheesecake, and stores will find substitutes. Remove the market for them, and stores have no reason to make them. - Rachel Lim [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 27-02-2007, 00:05
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
How do I know if I'm overloading the RC program?

I'm an experienced embedded programmer, but I'm still getting to know the IFI RC. I'm getting the feeling that I'm on the hairy edge of what the RC is capable of.

Despite my best efforts to partition the program into neat modular sections, I'm starting to see erratic behaviour that is hard to explain from simple bugs.

I get different behavior just from adding a simple (fully tested) function call. Printf's stop working for no apparent reason. I'm now able to crash the program simply by flicking a switch, and I can even put the RC into a fault mode that is only recoverable by powering it down (resetting it won't fix the problem).

So, I have some basic debugging questions:

1) What causes the Program State light to flash? Is it detecting that my code is not doing something in particular (like servicing the shared memory)?

2) Could I be exceeding my stack size (from nesting my calls to deep)? Is there an easy way to increase the stack allocation, or will it just use available memory until it runs into data? I see the size set to 0x0100 in the linker but I'm not sure how to change it.

3) I've limited my use of floats to only the essential functions, but I assume that I could be burning all my CPU time in PID loops etc. Will the program crash if I don't service all my code in the allotted 28ms click time?

4) I'm using 4 analog inputs and the Gyro and the Camera... Any way to tell if I'm getting too many interrupts or other critical elements?

Thanks for any advanced "generic" debugging help.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
 


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
Anyone know how fast the Solenoids on the MINI RC can turn on and off? Generalx5 Control System 1 06-01-2007 07:39
How do you program the Photoswitch nekng Programming 2 27-11-2006 13:41
how to add steps in the provided encoder program for the edu Zaramel2002 Programming 3 11-02-2004 08:35
i'm in the charleston area, and i'm looking to help out a team near here... dickymon General Forum 2 05-08-2002 16:40
does anybody know how to program a potentimeter (<--spelling mistake) chrisw Technical Discussion 4 25-01-2002 20:29


All times are GMT -5. The time now is 11:28.

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