mbed getting hanged!

09 Feb 2011

I have been making an whole system in which it measures temperature every 5 minutes and stores it in an flash drive . The data could be accessed via the ethernet port over than local LAN. It also does serial port communication with the use of interrupt. All works normally fine. But after taking some 10-15 readings the mbed gets hanged and does not work then. What could be causing this? Does mbed have any sleep state which it might be going into?

09 Feb 2011

Are you using the serial interrupts? Cuz I've had a problem with it, when buffering the data, it would hang, not going back to routine. Try not using the serial interrupts, then it would maybe work :-)

Lerche

09 Feb 2011

I had similar situation and could not determine what the cause was so I added a watchdog timer(see watchdog timer in COOKBOOK) to reset the mbed if nothing happened for a certain amount of time.

Bill

10 Feb 2011

Thanks christian and bill for the quick replies. Well yeah i am using serial interrupts and also the timer interrupt so i think thats whats causing the problem. Do you have any idea by which I could set priorities for them? As for the watchdog timer, thats a good fix but restarting the mbed always would cause a quite bit of loss time for my application so I would like to avoid it as fas as possible but in the end thats the only solution I have.

07 Mar 2011

Anyone find out why this is happening?

For a test bed kinda important to rule out issues before taking it to production :-)

07 Mar 2011

Im having the same issue too with Ethernet and writing to flash (LocalFileSystem). I suspected a memory leak (as my program uses a lot of malloc) but went and inspected my code twice to make sure that every dynamically allocated memory is freed. Still have the issue though. Resorted to a soft restart whenever I write something on flash

29 Sep 2011

If you are using multiple interrupts you may be getting into a conflict where each IRQ is waiting for the other to finish. A few things to check:

Have you tried wrapping either (or both) IRQ routines with disable_irq() and enable_irq() function so that an interrupt can't get "interrupted"? If that makes it work, you definitely have a deadlock situation. If so:

- Are the interrupts prioritized, that is, are they running at different priorities? If not, one may be waiting on the other

- Are you waiting on any I/O device from within any IRQ?

There are lots of ways to get into deadlock, sounds like this may be what is going on.

Or not ;-)

30 Sep 2011
30 Sep 2011

My experiences with Ethernet on mBed were not comforting , as also many others have reported. Until new libraries are available I wouldn't consider mBed a dependable platform for any Ethernet based project.

Also see this filesystem bug ... not sure if it's fixed yet

http://mbed.org/forum/mbed/topic/2273/