-->
Page 1 of 2

Reliable way to determine flash size?

PostPosted: Sun Jul 05, 2015 11:16 am
by Tinue
I have a number of ESP-12(E) modules. All of them (with old or new pinout) have a flash chip inside that has some combination of "25Q32" written on it. They all seem to be nameless clones, none is a genuine Winbond chip.

When I boot one of the "E" models with the AT firmware, it shows "8mbit", i.e. 1 MByte as the flash size. When I flash a NodeLUA firmware, a "node.info()" shows "4096" as the flash size, i.e. 4MByte of 512k, depending on whether the 4096 are bytes or bits.

The AT firmware could be upgraded OTA, so it can't be 512k.

Does anyone know of a way to determine the flash size reliably?

Edit: According to the reported ID, all three ESP-12(E) modules have a Gigadevice GD25Q32 flash chip. The three chips look very different to each other, so I guess they are copies / clones. In the end, I would have to actually write and read the flash to be sure, I think.

Re: Reliable way to determine flash size?

PostPosted: Sun Jul 05, 2015 3:22 pm
by tytower
Generically the 32 in 25Q32 means 32 Mega bits according to the datasheets

Re: Reliable way to determine flash size?

PostPosted: Sun Jul 05, 2015 3:47 pm
by martinayotte
You can write a small sketch that will display the chip ID using ESP.getFlashChipId() function.
Then, you can confirm the id using this list https://chromium.googlesource.com/chrom ... ashchips.h

Re: Reliable way to determine flash size?

PostPosted: Mon Jul 06, 2015 9:06 am
by Tinue
Thanks, that's exactly how I got the type that I reported above. Except that I didn't write a utility myself, but used esptool.py to read out the id.

Nevertheless, I still can't explain why the chip in AT mode reports 8 MBits, and the chip in LUA mode reports 4096 bits or bytes. Possibly the chip was flashed with a 1MByte image by the vendor, and not with a 4MByte image.

Plus in the end the flash chips themselves seem to be clones, and not genuine chips. So they can report whatever they want, much like one can buy 512GByte SD cards on eBay...

Does anyone have a utility that actually write the flash bit by bit, and reads back the content? This seems to be the only way to be sure.