Skip to content

System reset by watchdog after UDP send, message "mac 662" #1229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Dec 16, 2015 · 5 comments
Closed

System reset by watchdog after UDP send, message "mac 662" #1229

ghost opened this issue Dec 16, 2015 · 5 comments
Labels
type: troubleshooting waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@ghost
Copy link

ghost commented Dec 16, 2015

This issue seems new using core 2.0.0. The sketch sends an UDP broadcast message every 30 seconds and crashes randomly several times a day.

Serial debug shows this message from the core:

mac 662

and then the watchdog kicks in and reboots the ESP.

The sketch does not really much more than this:

IPAddress broadcastIP(255, 255, 255, 255);
portUDP.beginPacket(broadcastIP, Settings.UDPPort);
portUDP.write(data, 20);
portUDP.endPacket();

Anyone that knows what the mac 662 message is telling me?
(if I disable the UDP send, sketch is stable)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@igrr
Copy link
Member

igrr commented Dec 16, 2015

Make sure you (or libraries which you use) do not disable interrupts for
more than 20 microseconds.
Disabling interrupts is the usual cause of "mac 662" assertion.

On Wed, Dec 16, 2015, 19:05 mvdbro [email protected] wrote:

This issue seems new using core 200 The sketch sends an UDP broadcast
message every 30 seconds and crashes randomly several times a day

Serial debug shows this message from the core:

mac 662

and then the watchdog kicks in and reboots the ESP

The sketch does not really much more than this:

IPAddress broadcastIP(255, 255, 255, 255);
portUDPbeginPacket(broadcastIP, SettingsUDPPort);
portUDPwrite(data, 20);
portUDPendPacket();

Anyone that knows what the mac 662 message is telling me?
(if I disable the UDP send, sketch is stable)


Reply to this email directly or view it on GitHub
#1229.

@ghost
Copy link
Author

ghost commented Dec 17, 2015

Thanks for your reply! Some comments on this:

  1. We're using dallas sensors and the ESP8277 onewire library contains stuff like this:

noInterrupts();
DIRECT_MODE_INPUT(reg, mask); // allow it to float
delayMicroseconds(70);
r = !DIRECT_READ(reg, mask);
interrupts();

So this 70 uSec delay could be an issue? Sending through HTTP client right after reading the sensor has never been a problem.

  1. The whole sketch runs fine without using UDP. The HTTPclient is much more heavily used in the same sketch without issues.

So it seems specific only to UDP (or just coincidence that when it crashes, it's allways just after the UDP send...)

@igrr
Copy link
Member

igrr commented Dec 18, 2015

Actually this should happen shortly after you return from an interrupts/noInterrupts block.
I guess OneWire library needs to be fixed. I wonder if it will work if you just remove interrupts/noInterrupts.

@devyte
Copy link
Collaborator

devyte commented Oct 18, 2017

@mvdbro is this issue still valid with latest git? with PR #3362 ?

@devyte devyte added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Oct 18, 2017
@devyte
Copy link
Collaborator

devyte commented Jul 12, 2018

Closing due to lack of feedback and age.

@devyte devyte closed this as completed Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: troubleshooting waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

2 participants