-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Race in interrupts?? #2916
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
Labels
Milestone
Comments
@igrr if this is valid, I think we should give it priority, as it can cause a soft-brick. |
igrr
added a commit
that referenced
this issue
Sep 12, 2017
I know it was not the right way do do it, but it was a quick and dirty fix for me. |
igrr
added a commit
that referenced
this issue
Sep 13, 2017
d-a-v
pushed a commit
to d-a-v/Arduino
that referenced
this issue
Sep 29, 2017
onsdag 13 december 2017 11.17.30 skrev david gauchard:
I have not had time to test the new code yet.
When I look at the code, it looks good.
So i think it can be closed.
…--
My memory is like the Bermuda Triangle. Information sent there, can completely
disappear without a trace.
/Anders
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basic Infos
Hardware
Hardware: ESP-12E
Core Version: ?2.1.0-rc2?
Description
Problem description
In file: esp8266/cores/esp8266/core_esp8266_wiring_digital.c
In function: __attachInterrupt
the interrupt handler is set before cleaning interrupts for the receive pin witch make the receive sensitive to transitions high to low or low to high.
When this happends the device gets stuck in boot phase.
My proposal is to move
the line
interrupt_handler_t *handler = &interrupt_handlers[pin];
to after cleaning interrupt.As:
extern void ICACHE_RAM_ATTR __attachInterrupt(uint8_t pin, voidFuncPtr userFunc, int mode) {
if(pin < 16) {
// interrupt_handler_t *handler = &interrupt_handlers[pin];
handler->mode = mode;
handler->fn = userFunc;
interrupt_reg |= (1 << pin);
GPC(pin) &= ~(0xF << GPCI);//INT mode disabled
GPIEC = (1 << pin); //Clear Interrupt for this pin
// Put tis line here:
interrupt_handler_t *handler = &interrupt_handlers[pin];
GPC(pin) |= ((mode & 0xF) << GPCI);//INT mode "mode"
}
}
Settings in IDE
Module: NodeMCU
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: ?qio?
Flash Frequency: 40Mhz
Upload Using: SERIAL/USB
Reset Method: nodemcu
/Anders
The text was updated successfully, but these errors were encountered: