Closed p1337 closed 8 years ago
with out a objdump or at least a call stack analyses its hart to say where the error is coming from.
Thanks for your help! This is a nice tool:
this is the errorcode:
Decoding 26 results
0x402050a9: IPAddress at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/IPAddress.cpp:87
(inlined by) __static_initialization_and_destruction_0 at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/IPAddress.h:90
(inlined by) _GLOBAL__sub_I__ZN9IPAddressC2Ev at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/IPAddress.cpp:113
0x40105427: ets_timer_arm_new at ??:?
0x402034f1: WiFiClient::connect(char const*, unsigned short) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\libraries\ESP8266WiFi\src/WiFiClient.cpp:362
0x402012d0: delay at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_wiring.c:70
0x40205588: Print::println(String const&) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/Print.cpp:135
0x402026e8: trigger() at C:\Program Files (x86)\Arduino/functions.ino:137
0x40205458: Print::write(unsigned char const*, unsigned int) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/Print.cpp:39
0x40106ef2: interrupt_handler at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_wiring_digital.c:156
0x40106e6c: interrupt_handler at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_wiring_digital.c:156
0x4000050c: ?? ??:0
0x40000f68: ?? ??:0
0x40000f58: ?? ??:0
0x4021be55: tcp_input at ??:?
0x40105427: ets_timer_arm_new at ??:?
0x40233370: inet_chksum_pbuf at ??:?
0x4021d986: sys_timeouts_init at ??:?
0x40207aa3: pp_enable_noise_timer at ??:?
0x40207b0c: pp_enable_noise_timer at ??:?
0x401052ce: ets_timer_setfn at ??:?
0x40224c01: ets_timer_handler_isr at ??:?
0x40224c20: ets_timer_handler_isr at ??:?
0x40224c01: ets_timer_handler_isr at ??:?
0x40224c46: ets_timer_handler_isr at ??:?
0x402047f3: loop_task at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_main.cpp:43
0x40000f49: ?? ??:0
0x40000f49: ?? ??:0
you nee to add the
epc1=0x40201730 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
line too since 0x40201730 is the address of the last executed command.
This is the actual result:
Exception (9):
epc1=0x401052a6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000003 depc=0x00000000
ctx: sys
sp: 3ffffc10 end: 3fffffb0 offset: 01a0
>>>stack>>>
3ffffdb0: 0905050a 00000008 3fff048c 402050d9
3ffffdc0: c0033035 40105427 3ffffe00 402034f1
3ffffdd0: 00000000 00000001 402012d0 00000064
3ffffde0: 3ffef36c feefef00 3fff048c 402055b4
3ffffdf0: feefeffe 3ffe8370 3fff048c 402026e8
3ffffe00: 3ffe8ac8 00000000 000003e8 feefeffe
3ffffe10: 00000000 00000000 feefeffe feefeffe
3ffffe20: feefeffe feefeffe feefeffe feefeffe
3ffffe30: feefeffe feefeffe feefeffe feefeffe
3ffffe40: feefeffe 04080000 001c110c 01010000
3ffffe50: 3fff048c 00000003 3fff0400 00000001
3ffffe60: 3ffe84e5 40205458 3fff0400 00000001
3ffffe70: c0033035 0000000e 00000000 40106ef2
3ffffe80: ffffffff 00000020 00000000 4000050c
3ffffe90: 00000000 00000000 0000001f 00000022
3ffffea0: 3fffc200 40106e6c 3fffc258 4000050c
3ffffeb0: 40000f68 00000030 0000001b ffffffff
3ffffec0: 40000f58 00000000 00000020 00000000
3ffffed0: 0021deda 00000001 00003a98 00000000
3ffffee0: ffffffff 3fffc6fc 00000001 3fffdab0
3ffffef0: 00000000 3fffdcb0 3ffeea68 00000030
3fffff00: fdb2d531 d7a81518 d98a861f 21a05724
3fffff10: a271a285 ffffffff ffffffff 4021be7d
3fffff20: 3ffe8fe4 40105427 402333a0 4021d9ae
3fffff30: 00000000 00000001 40207acb 3ffe8fe4
3fffff40: 3ffeea40 3ffe8fe0 3ffeea40 00000001
3fffff50: 40207b34 3ffe8fe4 3ffeea40 006c2091
3fffff60: 401052ce 40224c29 3ffeea18 3ffeea40
3fffff70: 40224c48 60000600 ffffffff 40224c29
3fffff80: 40224c6e 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffeea68 3fffdad0 3ffef410 402047f3
3fffffa0: 40000f49 48374cf5 3fffdab0 40000f49
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld
Decoding 29 results
0x401052a6: ets_timer_setfn at ??:?
0x402050d9: Print::write(char const*) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/Print.h:60
0x40105427: ets_timer_arm_new at ??:?
0x402034f1: WiFiClient::connect(char const*, unsigned short) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\libraries\ESP8266WiFi\src/WiFiClient.cpp:362
0x402012d0: delay at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_wiring.c:70
0x402055b4: Print::println(char const*) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/Print.cpp:143
0x402026e8: trigger() at C:\Program Files (x86)\Arduino/functions.ino:137
0x40205458: Print::write(unsigned char const*, unsigned int) at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/Print.cpp:39
0x40106ef2: interrupt_handler at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_wiring_digital.c:156
0x4000050c: ?? ??:0
0x40106e6c: interrupt_handler at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_wiring_digital.c:156
0x4000050c: ?? ??:0
0x40000f68: ?? ??:0
0x40000f58: ?? ??:0
0x4021be7d: tcp_tmr at ??:?
0x40105427: ets_timer_arm_new at ??:?
0x402333a0: inet_chksum_pbuf at ??:?
0x4021d9ae: sys_timeout at ??:?
0x40207acb: pp_enable_noise_timer at ??:?
0x40207b34: pp_noise_test at ??:?
0x401052ce: ets_timer_setfn at ??:?
0x40224c29: ets_timer_handler_isr at ??:?
0x40224c48: ets_timer_handler_isr at ??:?
0x40224c29: ets_timer_handler_isr at ??:?
0x40224c6e: ets_timer_handler_isr at ??:?
0x402047f3: loop_task at C:\Users\p1337\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.1.0-rc2\cores\esp8266/core_esp8266_main.cpp:43
0x40000f49: ?? ??:0
0x40000f49: ?? ??:0
0x4010f000: ?? ??:0
is this the problem, what does
Exception (9):
epc1=0x401052a6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000003 depc=0x00000000
0x401052a6: ets_timer_setfn at ??:?
say ?
what core version do you use? at the first look it looks like a NULL ptr usage or flash access problem during interrupt. do you use any interrupt?
Hi, thanks for the fast reply - I´m using V2.1.0-rc2 with arduino IDE 1.6.5
i am using two interrupts ... the interrupt for the trigger() funktion is called before reset.
pinMode(BTN_2, INPUT_PULLUP); attachInterrupt( BTN_2, trigger, FALLING ); //TRIGGERBUTTON
try to move your trigger
function to ram.
void ICACHE_RAM_ATTR trigger() {
}
Wait, you're using WiFiClient from an interrupt handler? This won't work, you need to set a flag in the ISR and check the flag in your loop function.
On Wed, Feb 3, 2016, 23:52 p1337 notifications@github.com wrote:
Hi, thanks for the fast reply - I´m using V2.1.0-rc2 with arduino IDE 1.6.5
i am using two interrupts ... the interrupt for the trigger() funktion is called before reset.
pinMode(BTN_2, INPUT_PULLUP); attachInterrupt( BTN_2, trigger, FALLING ); //TRIGGERBUTTON
— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/1540#issuecomment-179459108.
oh okay thx :) could you help me out how to do this, with the ISR ?
bool request = false;
void trigger() {
request = true;
}
void loop() {
if(request) {
WiFiClient client;
const int httpPort = 80;
Serial.println(host);
if (!client.connect(host, httpPort)) {
delay(100);
Serial.println("connection failed - Status");
return;
}
......
request = false;
}
}
okay, i checkt this out
NO CRASHES ANY MORE!!!! Thank you ----- i disabled only the interrupt .... asking in the loop for a button state .
`void loopstodeepsleep(int loops){ Serial.print ("LOOPING-MAIN-LOOP "); Serial.print (nrloops); Serial.print (" of "); Serial.println (loops);
nrloops++;
if (digitalRead(BTN_1) == HIGH ){
trigger();
}
delay(500);
if (nrloops >= loops) {
deepsleep();
}
}`
Life Saver! Attempting to use wifi on an esp was causing a similar crash, when used inside a timer.
im also have same problem
`
MFRC522 rfid(SS_PIN, RST_PIN); // Instance of the class
MFRC522::MIFARE_Key key;
// Init array that will store new NUID byte nuidPICC[3]; byte A[4]; byte value; int address = 999; int minaddr=1000; int maxaddr=2000; int maxcard=1; int ncard; boolean match=false; boolean q=false;
void bacaRFID(); void regisRFID(); void clearEEP(int minADDR,int maxADDR,int Value);
char x; int i=0; char inSerial[10];
void setup() { //============================================ //inisialisasi Serial.begin(115200); SPI.begin(); // Init SPI bus rfid.PCD_Init(); // Init MFRC522 EEPROM.begin(maxaddr); clearEEP(998,maxaddr,0); pinMode(relay,OUTPUT); //============================================ //cek EEPROM Serial.println(); for ( int j = 0; j < 1+(maxcard*4); j++ ) { value = EEPROM.read(address+j); Serial.print(address+j); Serial.print("\t"); Serial.print(value, DEC); Serial.println(); delay(10); } //============================================
for (byte i = 0; i < 4; i++) { //key.keyByte[i] = 0xFF; nuidPICC[i]= 0xFF; } // rfid.PCD_SetAntennaGain(rfid.RxGain_max); //=========================================== //menunggu komunikasi serial tersedia while (!Serial){;} Serial.println();
//=========================================== //mendaftarkan kartu RFID while(1) { regisRFID(); if(EEPROM.read(999)==maxcard){delay(10);break;} } digitalWrite(relay,LOW); Serial.println("ready"); }
void loop() { // put your main code here, to run repeatedly:
bacaRFID(); if(cariRFID(nuidPICC)) { q=!q; Serial.println("kartu dikenali");//card is recognised } else { if(nuidPICC[0]!=255 && nuidPICC[1]!=255 && nuidPICC[2]!=255 && nuidPICC[3]!=255) { Serial.println("kartu tidak dikenal");//card is not recognised }; }; if(q) { digitalWrite(relay,HIGH); } else { digitalWrite(relay,LOW); }
for (byte i = 0; i < 6; i++) { nuidPICC[i]= 0xFF; } }
void readID( int number )
{
int start = (number 4 ) + 1000; // Figure out starting position
for ( int i = 0; i < 4; i++ ) { // Loop 4 times to get the 4 Bytes
A[i] = EEPROM.read(start + i); // Assign values read from EEPROM to array
}
}
boolean cariRFID(byte B[])
{
int count=EEPROM.read(999);
for ( int i = 0; i <= count; i++ )
{
readID(i);
if(compRFID(B,A))
{
return true;
break;
}
}
return false;
}
boolean compRFID( byte a[], byte b[] )
{
if ( a[0] != NULL ) // Make sure there is something in the array first
match = true; // Assume they match at first
for ( int k = 0; k < 4; k++ ) { // Loop 4 times
if ( a[k] != b[k] ) // IF a != b then set match = false, one fails, all fail
match = false;
}
if ( match ) { // Check to see if if match is still true
return true; // Return true
}
else {
return false; // Return false
}
}
void regisRFID()
{
while(EEPROM.read(999)<maxcard)//if no card registered in EEPROM
{
Serial.println("Silahkan tap kartu yang ingin didaftarkan");
ncard=EEPROM.read(999);
Serial.print("kartu ");
Serial.println(ncard+1);
//========================================
//read RFID card, loop if no card detected
while(1)
{
bacaRFID();
delay(10);
if(nuidPICC[0]!=255 && nuidPICC[1]!=255 && nuidPICC[2]!=255)
{
if(cariRFID(nuidPICC))
{
Serial.println("Kartu sudah terdaftar");
for (byte i = 0; i < 4; i++)
{
nuidPICC[i]= 0xFF;
}
}
else
{
break;
}
}
}
//========================================
//write card to EEPROM
int dptr = (ncard4)+minaddr;
for ( int j = 0; j < 4; j++ ) // Loop 4 times
{
EEPROM.write(j+dptr, nuidPICC[j] ); // Write scanned PICC's UID to EEPROM, start from address 3
delay(10);
}
for (byte i = 0; i < 4; i++)
{
nuidPICC[i]= 0xFF;
}
EEPROM.write(999, ncard+1);
EEPROM.commit();
delay(10);
}
//========================================
//check the EEPROM value
for ( int j = 0; j < 1+(maxcard*4); j++ )
{
value = EEPROM.read(address+j);
Serial.print(address+j);
Serial.print("\t");
Serial.print(value, DEC);
Serial.println();
delay(10);
}
}
void bacaRFID()//read RFID card
{
// Look for new cards
if ( ! rfid.PICC_IsNewCardPresent())
return;
// Verify if the NUID has been readed if ( ! rfid.PICC_ReadCardSerial()) return;
MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
// Check is the PICC of Classic MIFARE type
if (piccType != MFRC522::PICC_TYPE_MIFARE_MINI &&
piccType != MFRC522::PICC_TYPE_MIFARE_1K &&
piccType != MFRC522::PICC_TYPE_MIFARE_4K) {
Serial.println(F("Kartu tidak kompatibel, Coba kartu lain"));
return;
}
// Store NUID into nuidPICC array
for (byte i = 0; i < 4; i++)
{
nuidPICC[i] = rfid.uid.uidByte[i];
Serial.print(nuidPICC[i]);
Serial.print(" ");
}
Serial.println();
// Halt PICC rfid.PICC_HaltA();
// Stop encryption on PCD //rfid.PCD_StopCrypto1(); //return 1; } void clearEEP(int minADDR,int maxADDR,int Value)//to erase data from EEPROM { for (int i = minADDR; i < maxADDR; i++) { EEPROM.write(i, Value); } }
`
Run the above code, and get the following error from time to time.
`Exception (9): epc1=0x40203e4b epc2=0x00000000 epc3=0x00000000 excvaddr=0x4010ffff depc=0x00000000
ctx: cont sp: 3ffef8d0 end: 3ffefac0 offset: 01a0
stack>>> 3ffefa70: 00020004 3ffee84c 3ffeea68 402024d8 3ffefa80: 3ffe84dc 3ffee808 3ffee80c 4020216b 3ffefa90: 3fffdad0 00000000 3ffeea8c 402021f0 3ffefaa0: 3fffdad0 00000000 3ffeea8c 40203c30 3ffefab0: feefeffe feefeffe 3ffeeaa0 40100710 <<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 1384, room 16 tail 8 chksum 0x2d csum 0x2d v614f7c32 ~ld`
can you guys help me ?
Hello ESP-Ardu community ! I´m working with the ESP 12-e for a while - after connecting the accesspoint as client the ESP resets:
Here comes the exit code:
And the error:
what does this mode mean?
greetins from south germany.
Robert