Hangs after hour or so

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

Hangs after hour or so

Postby kreyl » Sun Apr 14, 2013 1:48 pm

stm32f205ve + ChibiOS v2.5.1, 3 threads except idle one, couple of event sources with listeners.
My system hangs time after time; and this time is around an hour - maybe more, maybe less. During all this long time it works perfectly.
I did not managed to repeat the problem within a reasonable time to figure out the point of problem.
Are there any common techniques to operate with such circumstances? Maybe this is common scenario, and I should check some exact points?
Thanks in advance!

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Hangs after hour or so

Postby Giovanni » Sun Apr 14, 2013 1:54 pm

HI,

Usually this is because a race condition somewhere or a stack overflow, are you running with the debug options activated? especially the state checker could be helpful.

Giovanni

User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

Re: Hangs after hour or so

Postby kreyl » Sun Apr 14, 2013 2:05 pm

Hi Giovanni The Great!
I am sorry, what is state checker?
Currently I have enabled debug and started debug session in hope to understand where it hangs when (and if) this will occure.
Here is my code, by the way; recomendations and comments would be very welcome.
http://nute.googlecode.com/svn/trunk/Ar ... let3/Gate/
http://nute.googlecode.com/svn/trunk/Ar ... Common_fw/
Thank you again!

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: Hangs after hour or so

Postby mabl » Sun Apr 14, 2013 2:12 pm

Giovani means the CH_DBG_Flags in chconf.h. Please make sure you have them enabled, especially CH_DBG_SYSTEM_STATE_CHECK, it looks like you did not. You need working debugging too.

User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

Re: Hangs after hour or so

Postby kreyl » Sun Apr 14, 2013 2:33 pm

Within a 40 minutes of normal running, I have got debug session stopped with

Code: Select all

warning: Remote failure reply: E31

Fast googling end up at Atollic: http://www.atollic.com/index.php/kb/11- ... ower_modes
Therefore I have next question: does ChibiOS switch CPU to some power-save mode(s), and if yes - where and when?
Thank you!

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Hangs after hour or so

Postby Giovanni » Sun Apr 14, 2013 3:05 pm

It is what Mabl explained.

ChibiOS does not switch in low power modes by itself unless you add code to do that.

BTW, are you using Atollic?

This could be of some help too: http://www.chibios.org/dokuwiki/doku.ph ... ebug_guide

Giovanni

User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

Re: Hangs after hour or so

Postby kreyl » Sun Apr 14, 2013 3:09 pm

When I enabled CH_DBG_SYSTEM_STATE_CHECK to TRUE, I have an error:
chdebug.c:77:5: error: too few arguments to function 'chDbgPanic'
Indeed, there is

Code: Select all

 chDbgPanic("SV#1");

and in chdebug.h, at line 239, there is prototype:

Code: Select all

void chDbgPanic(const char *msg1, const char *msg2);


Seems like something incorrect.

User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

Re: Hangs after hour or so

Postby kreyl » Sun Apr 14, 2013 3:11 pm

I use Eclipse Juno + YAGARTO + different stm Discovery boards.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Hangs after hour or so

Postby Giovanni » Sun Apr 14, 2013 3:40 pm

Hi,

Which ChibiOS version are you using?, I don't see that void chDbgPanic(const char *msg1, const char *msg2) in any of the maintained releases.

Giovanni

User avatar
kreyl
Posts: 59
Joined: Sun Jan 13, 2013 11:46 pm
Been thanked: 4 times
Contact:

Re: Hangs after hour or so

Postby kreyl » Sun Apr 21, 2013 6:24 pm

I use v. 2.5.1.
Actually, chDbgPanic defined at line 239 of chdebug.h:

Code: Select all

void chDbgPanic(const char *msg);

...has one parameter.
But chDbgAssert tries to use two parameters (defined at line 195 of chdebug.h):

Code: Select all

#if !defined(chDbgAssert)
#define chDbgAssert(c, m, r) {                                              \
  if (!(c))                                                                 \
    chDbgPanic(m, r);                                                          \
}


Any comments?


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 17 guests