determine flash size
Posted: Wed Apr 15, 2015 3:07 am
Is there an easy way to determine the size of the flash chip used on a module via software? It appears that ESP-12 modules are shipped with different flash sizes. Is there a way to get the size of the flash chip installed via software (without opening the metal housing to read the chip model)?
As far as I can tell the SDK functions just provide back what's stored initially which is essentially defined in the makefile - hence if I define 512kB (4Mbit) in the makefile everything works fine no matter if the actual chip is way bigger but probably the SDK calls to determine flash size will return 512kB no matter what the real size is.
One option (last resort) could be to write a program that just tries write to the flash and then reads from the same address... (starting with 128M and then going down).
As far as I can tell the SDK functions just provide back what's stored initially which is essentially defined in the makefile - hence if I define 512kB (4Mbit) in the makefile everything works fine no matter if the actual chip is way bigger but probably the SDK calls to determine flash size will return 512kB no matter what the real size is.
One option (last resort) could be to write a program that just tries write to the flash and then reads from the same address... (starting with 128M and then going down).