Chat freely about anything...

User avatar
By bh_elektricar
#32179 I have updated SDK from 1.0.1 to 1.4 and now I have problem reading flash. It happens randomly and I can not spot any pattern. This is my code:

Code: Select alldebug_print("Reading from address %08x to buffer at %08x\n", sector << READ_BUFFER_SHIFT, rBuffer.buffer);
flashResult = spi_flash_read(sector << READ_BUFFER_SHIFT,  (uint32 *) rBuffer.buffer, READ_BUFFER_SIZE);  <- exception is here
debug_print("Reading finished, result: %d\n", flashResult);


This is my debug output:
...
fsOpen: www/wifi/esp8266.html
Reading from address 00020000 to buffer at 3fff56b0
Reading finished, result: 0
Reading from address 00020200 to buffer at 3fff56b0
Reading finished, result: 0
Reading from address 00020240 to buffer at 3fff56b0
Reading finished, result: 0
Reading from address 00020480 to buffer at 3fff56b0
Fatal exception 0(IllegalInstructionCause):
epc1=0x402467c0, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x0

ets Jan 8 2013,rst cause:1, boot mode:(3,7)

load 0x40100000, len 29120, room 16
tail 0
chksum 0x70
...


As I said, this happens randomly, so the problem is not related to specific flash address or buffer address.
User avatar
By bh_elektricar
#32225 I have reverted to SDK v 1.0.1. and problem is still there. It seems it was a coincidence that problem appeared after upgrading SDK. There is a difference, though. Now it says it restarts because of watchdog reset. It is interesting that I can read same block of flash 3-5 times and then it resets.
User avatar
By skandalfo
#44674 I'm seeing this too.

I checked two different dev boards to see if one was flaky, but both have the same behavior.

I'm on SmingRTOS on top of Espressif's RTOS SDK 1.4.0

This is what I get:

Code: Select allFatal exception (0):
epc1=0x40244940
epc2=0x00000000
epc3=0x40004371
epcvaddr=0x00000000
depc=0x00000000
rtn_add=0x4010315f


With 0x40244940 mapping to vPortEnterCritical and 0x40004371 inside SPI_read_data. No idea what's going on.