]Fatal exception 0(IllegalInstructionCause)

gailu
Posts: 49
Joined: Fri May 29, 2015 2:03 pm

]Fatal exception 0(IllegalInstructionCause)

Postby gailu » Fri Apr 15, 2016 3:45 am

Hi Experts,

I am getting Fatal Exception quite often so can not use code in production. Looking forward to your help. This seems to be happening during spi_flash_erase_sector()

Fatal Exception Details
Fatal exception 0(IllegalInstructionCause):
epc1=0x40205f8a, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0

2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000


Checked address in (epc1=0x40205f8a) in .s file and instruction is beqz.n at this address

Code: Select all

40205f82:   3109         s32i.n   a0, a1, 12
    if(SPI_FLASH_RESULT_OK != spi_flash_erase_sector(SWITCH_STATUS_SECTOR))
40205f84:   f40901           l32r   a0, 40202fa8 <system_get_checksum+0x34>
40205f87:   0000c0           callx0   a0
40205f8a:   328c         beqz.n   a2, 40205f91 <write_switchstatus_sector+0x19>
    {
        LOG(("ERROR: %s:%d\r\n",__FILE__,__LINE__));
        return ERROR;   
40205f8c:   f27c         movi.n   a2, -1
40205f8e:   000946           j   40205fb7 <write_switchstatus_sector+0x3f>
    }

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ]Fatal exception 0(IllegalInstructionCause)

Postby ESP_Faye » Mon Apr 18, 2016 8:52 pm

Hi,

You can print the "SWITCH_STATUS_SECTOR" to debug it.

Code: Select all

if(SPI_FLASH_RESULT_OK != spi_flash_erase_sector(SWITCH_STATUS_SECTOR))

gailu
Posts: 49
Joined: Fri May 29, 2015 2:03 pm

Re: ]Fatal exception 0(IllegalInstructionCause)

Postby gailu » Tue May 10, 2016 6:38 pm

Hi Expressif_Faye,

Value of SWITCH_STATUS_SECTOR 120. Can you please let me know what this value is related to IllegalInstructionCause.

I would like to provide you more input that this does happen only when we try to do very frequent erase and write, if we do slowly we do not see this Fatal Exception.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ]Fatal exception 0(IllegalInstructionCause)

Postby ESP_Faye » Thu May 12, 2016 3:01 pm

Hi,

Value of SWITCH_STATUS_SECTOR 120.

When the exception happened, the SWITCH_STATUS_SECTOR is 120 ?
Sector 120 is located to 480KByte address, will it break your firmware ?

gailu
Posts: 49
Joined: Fri May 29, 2015 2:03 pm

Re: ]Fatal exception 0(IllegalInstructionCause)

Postby gailu » Sun May 15, 2016 5:26 am

No, it Will not break my Firmware. We have application specific configuration stored at that address. It works find most of the time, we read and write configuration changes successfully. However when writes are fast (which include erase first) then only we see this crash.

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: ]Fatal exception 0(IllegalInstructionCause)

Postby ESP_Faye » Mon May 16, 2016 2:55 pm

Hi,

1. Which hardware module are you using ? Are you using the ESP-Launcher?
2. Please have a try with the attachment libs based on ESP8266_NONOS_SDK_V1.5.3.

If your problem is still unsolved, please provide your logs and test code, we will help debug it.

Thanks for your interest in ESP8266 !
Attachments
lib_dbg_flash_erase1.zip
(613.94 KiB) Downloaded 474 times

Who is online

Users browsing this forum: No registered users and 13 guests