-->
Page 1 of 3

Is "print(node.flashsize())" accurate?

PostPosted: Fri Jan 30, 2015 7:29 pm
by iHaveESP
I thought my module had more flash available than 512. I found this undocumented function. node.flashsize()

Without prying up the shield and reading the SPI chipID, what are your results? "print(node.flashsize())"

Re: Is "print(node.flashsize())" accurate?

PostPosted: Sat Jan 31, 2015 12:58 am
by MeNoGeek
Ha! The other day, when I saw the new esp-12 modules with 4MB, I was hoping more flash too, but my five ones returned 512k. And I also thought about peeking under the hood before deciding that I trusted the function. Maybe some other day.

Re: Is "print(node.flashsize())" accurate?

PostPosted: Sat Jan 31, 2015 3:01 am
by ozayturay
512 KB(ytes) equals 4Mb(its) and sometimes this can be confusing. All the modules i saw was 512KB modules.

Re: Is "print(node.flashsize())" accurate?

PostPosted: Sat Jan 31, 2015 3:27 am
by lethe
The NodeMCU dev-kit claims to have a 4MB (megabyte) ESP-12 module mounted:
https://github.com/nodemcu/nodemcu-devkit

There are also ESD-12 [sic] modules on Aliexpress labeled as "Large-capacity flash-4M":
http://www.aliexpress.com/item/Large-ca ... 09287.html

I ordered some, but since they didn't arrive yet, I can't tell if they actually have 4MB flash or 4Mb.
You should be able to obtain the flash ID with "esptool.py flash_id" without removing the shield. That command will only give you a hex manufacturer & chip ID, but fortunately the flashrom project maintains an extensive list in their source code:
http://code.coreboot.org/svn/flashrom/t ... ashchips.h