View previous topic :: View next topic |
Author |
Message |
ftsame Guest
|
reset angst!!!! |
Posted: Wed Jul 27, 2005 12:02 am |
|
|
hi everyone. the problem with my program is that it works only when it is reseted. theoratically it should work continously, but in reality it only works every time i clear the memory. can any body help me with my problem. i am dynamically allocating and freeing memory, could this have anything to do with this. would a watchdog timer be a suitable solution. in my program i am doing the string parsing of a gps, and then using a formula to calculate the truecourse between two points. this program works only once (and that upon a reset), even though i have a while(1) in the code. can any body suggest a solution
thank you
ft |
|
|
mwildbolz
Joined: 26 Jul 2005 Posts: 16
|
|
Posted: Wed Jul 27, 2005 1:29 am |
|
|
Can you post your code??
This would be very helpful |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
|
Posted: Wed Jul 27, 2005 5:15 am |
|
|
Your first step should be to use ICE2000/4000 or an ICD to step thru your code and see where you are freezing or looping. Or use simple rs232 statements to show your progress thru your state machine. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Wed Jul 27, 2005 5:58 am |
|
|
In addition to all the above:
Always mention your processor type and compiler version. I can remember there was a malloc error solved in one of the older releases.
The use of malloc/free should not be a problem, but do you really need them? Problem with the use of these functions in embedded systems with limited memory is that they will create memory fragmentation resulting in running out of memory in the long term (but not after running the program 1 time). |
|
|
mwildbolz
Joined: 26 Jul 2005 Posts: 16
|
|
Posted: Wed Jul 27, 2005 6:19 am |
|
|
Like MikeValencia said, i'd say, that i would be the best to implement some messages into your program to see, in which state the µC is (and the easiest way is to do this via the RS232 interface).
Greetings, Markus |
|
|
ftsame4 Guest
|
cheers guyz!!! |
Posted: Fri Jul 29, 2005 3:50 am |
|
|
thankyou to everyone for their useful suggestion, i am greatly indebted to you all
cheers |
|
|
|