2 years, 10 months ago.

what mbed_die function is for?

Hi mbeder,

What is mbed_die function is all about. When I compile my project in uvision and debug it manually I notice there are endless loop entering mbed_die function. What is the possible mistake that I made in my code?

Thanks

Comment on this question

1 Answer

2 years, 10 months ago.

It died :P.

Typical situation that one is called is for example when you try to make an SPI port on pins that do not support SPI. On most targets you will get info via your Serial connection to the PC why it was called.

Thanks Erik,

I tried to run RTC clock in my program. When I run it alone is fine but when I try to combine it with different library it died? Is there any conflict happen? RTC doesnt use any pin right? So I dont know what is happening because suddenly it jump to mbed die function when I debug it

posted by Fawwaz Nadzmy 19 Jan 2017

I don't know if some HardFault handlers and things like that are also now redirecting to mbed die, but I don't think so. Which library are you combing it with? And since you seem to be using a debugger, it must be doing something before it jumps there.

posted by Erik Olieman 19 Jan 2017

I use ESP8266 library with MQTT. The program start to jump to mbed_die after it want to init the time.

posted by Fawwaz Nadzmy 25 Jan 2017

So I suppose the init time function fails :).

Does it use the RTC? What happens if you try to init the RTC without that library, but just in a test program?

posted by Erik Olieman 26 Jan 2017

You need to log in to post a question