mac 985 ?
mac 985 ?
Postby alex323qp » Fri Jan 25, 2019 3:30 pm
I started to get this message and a WTD reset after implementing a UDP sender.
I'm sending less than 100 bytes every 20ms or so. The send is triggered by an external interrupt. After the first espconn_send the IRQ is disabled until sent_callback is called, then the IRQ is re-enabled.
Does anyone have any idea of what it means?
Thanks,
A.
Re: mac 985 ?
Postby alex323qp » Mon Jan 28, 2019 11:11 am
https://github.com/espressif/ESP8266_NO ... /issues/90
https://bbs.espressif.com/viewtopic.php?f=7&t=10424
A.
-
- Posts: 195
- Joined: Sat Apr 01, 2017 1:21 am
- Contact:
Re: mac 985 ?
Postby AgentSmithers » Tue Jan 29, 2019 6:02 am
Another thing is WDT only kicks off when frozen so I would add os_printf lines to your code to see where the execution pauses before the WDT kicks off. Things can be a bit harder to track down if you have timers kicking off functions too as they can cause a WDT in the background and cause red herrings.
Re: mac 985 ?
Postby alex323qp » Tue Jan 29, 2019 2:49 pm
Thanks for the reply!
Yeah, I do have wrappers in the header files that are used as event handlers for the espconn_xxxx callbacks, but my socket class has a private variable (_protocol) that should be unique between instances:
Code: Select all
// Callback wrapper in the header file (MySocketClass.h)
static void _onDataWrapper(void *args, char *data, unsigned short len) {
if(NULL != args){
struct espconn *connection = (struct espconn *) args;
// "reverse" points to the original object ( _conn.reverse = (void *) this; )
MySocketClass *obj = static_cast<MySocketClass*>(connection->reverse);
if(obj->_protocol == SOCKET_TYPE_TCP){
obj->onTCPDataSent();
}else if(obj->_protocol == SOCKET_TYPE_UDP){
obj->onUDPDataSent();
}
}
}
Anyway, as I mentioned in my update post, I rolled back to a version of the code without the UDP implementation and the same issue showed up, so it doesn't seem to be related.
Regarding the debug messages, it's a good idea, but I've been reluctant to do it because it would require adding printfs inside ISRs that might affect the behaviour in other unexpected ways, not to mention the full application has dozens of files some with thousands of lines, and since we don't know what's causing the problem It will take a while to debug the whole thing. Will give it a try though.
I'm still hoping someone from espressif will step in and throw some light on this issue.
Thanks again,
A.
Re: mac 985 ?
Postby Her Mary » Tue Jan 29, 2019 5:51 pm
-
- Posts: 195
- Joined: Sat Apr 01, 2017 1:21 am
- Contact:
Re: mac 985 ?
Postby AgentSmithers » Fri Feb 01, 2019 2:37 am
alex323qp wrote:Migrating the code is not an option at this stage, would take months.
Dude, No shit.. I feel you on that one

I have a bunch I have to convert myself to move to ESP32 to the point where I almost never want to.
I don't know if this will help your situation but are you debugging with that Breakpoint Stub? The issue is I'm not sure if it will disclose the stack trace for the WDT. Hmmmm, Not your kinda just spurred an idea. I'm pretty sure I want to write a Stacktrace tracker in SPI.. if the chip crashes maybe I can emulate a crash dump somehow to track current processes hmmmm.....
Who is online
Users browsing this forum: No registered users and 283 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.