4 years, 5 months ago.

stm32F429: httprequest randomly freezing

Hi. I have a little simple program that is more or less randomly crashing (panic leds) or freeze when calling MBED-HTTP's HttpRequest constructor, and i can't figure out why. More or less randomly means that it used to run ok, then started to stop after some time, then more and more sooner, then now almost all the time at the same call.(third or fourth)

Program has no thread, i just run all in main. I have no interrupts, no timers, no nothing fancy. I tried compiling online with official compiler, offline with eclipse, same result. I tried reusing socket and letting HttpRequest opening it each request, same result. i tried getting an idea about memory usage and used this routine before calling constructor to get largest memory block and i have around free 80KB each time. (source https://os.mbed.com/questions/6800/How-to-find-the-amount-of-free-space-on-/ )

I also tried putting all my logic in a thread, started from main and adding a while(1) at the end of main() that 1hz blinked a LED to check if it was totally killed when frozen or not. It looks like in fact sometimes it crashes and panics, sometimes not in a short time enough so that i can see it happening. (minutes time span) 1Hz Led keeps on blinking while httpRequest does not return.

I believe i must be doing something illegal with the HttpRequest, but can't figure ou what. Thanks for any hint, i'm going mad and out of options.

1 Answer

4 years, 4 months ago.

There are some discussions in the forum.

https://os.mbed.com/forum/mbed/topic/36241/

Accepted Answer

Thanks. Any hint would be much appreciated, there.

posted by Frederic Barachant 13 Nov 2019