[GH-ISSUE #889] why restart-up while attachInterrupt used; #753

Closed
opened 2026-02-28 01:26:53 +03:00 by kerem · 4 comments
Owner

Originally created by @wsdxyz on GitHub (May 22, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/889

Basic Infos

why esp8266 always restart-up while attachInterrupt used;

Hardware

**Esp8266

  • ESP8266

**Hardware: ESP-12e,

  • ESP12 E(nodemcu)

Description

why esp8266 always restart-up while attachInterrupt used;

Settings in IDE

Module: NodeMcu,

Additional libraries:
#include "WIFIManager.h"

Sketch

void setup() {
attachInterrupt(5,interrupt_1,3);
}

void loop() {
// put your main code here, to run repeatedly:
}

void interrupt_1 ()
{

}

#include <Arduino.h>

void setup() {

}

void loop() {

}

Debug Messages

[Info] Opened the serial port - COM29
r$
ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vac02aff5
~ld
[Done] Closed the serial port

Originally created by @wsdxyz on GitHub (May 22, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/889 ### Basic Infos why esp8266 always restart-up while attachInterrupt used; #### Hardware **Esp8266 - [ ] ESP8266 **Hardware: ESP-12e, - [ ] ESP12 E(nodemcu) ### Description why esp8266 always restart-up while attachInterrupt used; ### Settings in IDE Module: NodeMcu, Additional libraries: #include "WIFIManager.h" ### Sketch void setup() { attachInterrupt(5,interrupt_1,3); } void loop() { // put your main code here, to run repeatedly: } void interrupt_1 () { } #include <Arduino.h> void setup() { } void loop() { } ### Debug Messages [Info] Opened the serial port - COM29 r$ ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d vac02aff5 ~ld [Done] Closed the serial port
kerem closed this issue 2026-02-28 01:26:53 +03:00
Author
Owner

@tablatronix commented on GitHub (May 22, 2019):

and it works if you remove wifimanager?

<!-- gh-comment-id:494794870 --> @tablatronix commented on GitHub (May 22, 2019): and it works if you remove wifimanager?
Author
Owner

@tablatronix commented on GitHub (May 22, 2019):

Should interrupt_1 be in IRAM?
ICACHE_RAM_ATTR

<!-- gh-comment-id:494901494 --> @tablatronix commented on GitHub (May 22, 2019): Should interrupt_1 be in IRAM? `ICACHE_RAM_ATTR`
Author
Owner

@wsdxyz commented on GitHub (May 23, 2019):

hi, tablatronix, thanks for your reply.
it's worked while i only use attachInterrupt without #include WiFiManager;
and also worked while #include WiFiManager without attchInterrupt
but not works while only conbined them both;

<!-- gh-comment-id:495020236 --> @wsdxyz commented on GitHub (May 23, 2019): hi, tablatronix, thanks for your reply. it's worked while i only use attachInterrupt without #include WiFiManager; and also worked while #include WiFiManager without attchInterrupt but not works while only conbined them both;
Author
Owner

@wsdxyz commented on GitHub (May 23, 2019):

hi, tablatronix, Thanks a lot for your solution on ICACHE_RAM_ATTR!
this problem of restart-up is perfectly solved by your solution: ICACHE_RAM_ATTR.
below is my code:
void ICACHE_RAM_ATTR interrupt_1 () ;

<!-- gh-comment-id:495039719 --> @wsdxyz commented on GitHub (May 23, 2019): hi, tablatronix, Thanks a lot for your solution on ICACHE_RAM_ATTR! this problem of restart-up is perfectly solved by your solution: ICACHE_RAM_ATTR. below is my code: void ICACHE_RAM_ATTR interrupt_1 () ;
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#753
No description provided.