As the title says... Chat on...

User avatar
By lethe
#11198
iHaveESP wrote:I think those buying "Large-capacity flash-4M" modules are getting fooled, it's just 512Kb.

My modules have arrived and really have 4MByte flash (0xEF/0x4016 which translates to a Winbond W25Q32 flash chip).
User avatar
By picstart
#11210
My modules have arrived and really have 4MByte flash (0xEF/0x4016 which translates to a Winbond W25Q32 flash chip).


Now I am really confused.

There is no mention of where 0xEF/0x4016 comes from unless it is lasered onto the chip itself. So maybe the responder is saying the tin can was popped off and the chip's lasered label read.

The issue of the thread mostly seems to be what does lua report either by node.flashid() or the undocumented
node.flashsize.

With a W25Q32 installed ( lasered on the chip) I'm getting an id 1458415 and a size of 512K.
The suspicion is lau has things wrong and it always reports the 512 chip regardless of what actually is installed.
If lua was working there would be no need to look at the chip directly to get its capacity.
User avatar
By lethe
#11213
picstart wrote:There is no mention of where 0xEF/0x4016 comes from unless it is lasered onto the chip itself. So maybe the responder is saying the tin can was popped off and the chip's lasered label read.

See my earlier post here: viewtopic.php?p=8571#p8571
These values are also listed in the W25Q32 datasheet.

picstart wrote:The issue of the thread mostly seems to be what does lua report either by node.flashid() or the undocumented
node.flashsize.

My initial post was about how to determine the flash size without having to remove the metal shield on ESP-07/08/12 modules. Since I do not use nodemcu, I was not aware of node.flashid().

picstart wrote:With a W25Q32 installed ( lasered on the chip) I'm getting an id 1458415 and a size of 512K.

nodemcu seems to have a strange way of reporting the flash id, but it somehow makes sense. 1458415 is 0x1640EF, EF is obviously the manufacturer code and if you swap the other 2 bytes, you get 4016.

picstart wrote:The suspicion is lau has things wrong and it always reports the 512 chip regardless of what actually is installed.
If lua was working there would be no need to look at the chip directly to get its capacity.

I just flashed the latest nodemcu release and can confirm that its not reporting the correct flash size, so I guess it's safe to assume that flashsize detection at runtime does not work (or is not implemented, I didn't check the code).
User avatar
By picstart
#11239
1458415 is 0x1640EF, EF is obviously the manufacturer code and if you swap the other 2 bytes, you get 4016.

Good catch... Thanks and oops I didn't see your python script to get the flashid that you posted in a different thread.
So lua with node.flashid() in a quirky way is reading the flash chip id (manufacturer code ). The size from the undocumented node.flashsize() has issues but getting 50% of things to work with lua is always pleasant.