SPI Flash Size 0x1440ef

skywave
Posts: 13
Joined: Sun May 17, 2015 3:33 am

SPI Flash Size 0x1440ef

Postby skywave » Tue Jul 26, 2016 2:20 am

Hi There,

I'm developing a project with the ESP-09 module. When I read the Flash ID it returns: 0x1440ef - I presume this means (0xEF) Winbond (4014) 8MBit -> 1Mbytes Flash chip. However when I try to read from positions above 512K for instance:
spi_flash_read(524288, (uint32 *)b, 128); the read fails with code SPI_FLASH_RESULT_ERR. I am doing something wrong? Shouldn't I be able to read and/or write positions above the 512K threshold or am I mistaken about the flash size?

Looking forward to hearing from you soon,

Pedro

User avatar
pratik
Posts: 349
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: SPI Flash Size 0x1440ef

Postby pratik » Tue Jul 26, 2016 2:46 pm

Hello Pedro,

I do not have a 1MB flash at hand right now, but I tried to read from a 32Mbit flash from places where the code is stored (like it would be on a 1MB flash at 512kB address), and also from unused addresses as shown in the logs here.
You can read the entire flash, both using IRAM or ICACHE type functions, at any location irrespective of where your program is stored.
I would simply doubt the authenticity of the ESP-xx modules! There is a lot of non-standard stuff being used in there. Try using your program on another ESP module and let me know if it works...

Flash read with ICACHE_FLASH_ATTR:
Flash ID: 1458337
Reading from 0x00000100:READ OK
Reading from 0x00001040:READ OK
Reading from 0x00200000:READ OK

Flash read with IRAM_ATTR:
Flash ID: 1458337
Reading from 0x00000100:READ OK
Reading from 0x00001040:READ OK
Reading from 0x00200000:READ OK

Flash read test completed...
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

skywave
Posts: 13
Joined: Sun May 17, 2015 3:33 am

Re: SPI Flash Size 0x1440ef

Postby skywave » Tue Jul 26, 2016 7:19 pm

Hi There,

Thank you for your reply. The flash chip has the following written on it: 8C429 0G1014 and the supplier has replied confirming the 1MBytes size, but I still cannot read from positions above 512K. Is there a table where I can check the manufacturer / ID / size of chip? Is there any other software mechanism of some sort that might prevent reading from flash? Why are there ESP-09 and RSP-09 modules on market right now?

Looking forward to hearing from you soon,

Pedro

User avatar
pratik
Posts: 349
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: SPI Flash Size 0x1440ef

Postby pratik » Thu Jul 28, 2016 11:23 am

Hello,

If I had this problem, I'd try to see if I can upload a BIN file to addresses above 512kB and see if it was programmed successfully.
I doubt there is something wrong with the ESP8266 or the SDK, because if you can read the initial 512kB, it means that the timing and interface is being driven properly by the ESP8266. But just in case, you may try compiling with an earlier SDK as well.

Please keep me updated on this. This seems like an unusual problem.

Regards,
Pratik Panda
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

sake402
Posts: 6
Joined: Fri Sep 30, 2016 6:18 am

Re: SPI Flash Size 0x1440ef

Postby sake402 » Sat Oct 01, 2016 1:09 am

I am currently having the same issue as this.

Reading flash below 512k is successful, but not above.

I confirmed that the flash is 4M with esp_tool

Code: Select all

esptool.py v1.2-dev
Connecting...
Manufacturer: ef
Device: 4016


And I successfully loaded a 128KBytes spiff binary at address 0x3D7000

Code: Select all

esptool.py --port COM1 write_flash 0x3D7000 output/data.bin
esptool.py v1.2-dev
Connecting...
Running Cesanta flasher stub...
Writing 131072 @ 0x3d7000... 0 (0 %)
Wrote 131072 bytes at 0x3d7000 in 11.7 seconds (89.7 kbit/s)...
Leaving...


But in the code, attempting to read the spiff binary fails

Code: Select all

SPIFF: Reading flash address: 0x3d70fe size: 2
SPIFF: Reading flash fails @ address 0x3d70fc


I am using the RTOS SDK

Who is online

Users browsing this forum: No registered users and 1 guest