Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By kolban
#31787 Using esptool to read the flash_id information, I find that my NodeMCU dev kit returns:

Manufacturer: e0
Device: 4016

I am not sure how to interpret this. I am thinking that based on the manufacturer, the device code can then be looked up ... but where would one find a list of codes for decoding purposes?
User avatar
By dkinzer
kolban wrote:Manufacturer: e0
Device: 4016
The device code 0x4016 from manufacturer 0xe0 (WinBond) denotes a 32Mbit (4 megabyte) chip. The chip itself is probably a W25Q32. You can verify the device id in the datasheet: ... motive.pdf

The code 0x4015 is a 2MB Flash chip. I got this information from an include file to which a link was posted on a message board somewhere but now I can't find it.
User avatar
By martinayotte
#31791 Hi Kolban,
Here is the piece of code in ArduinoESP Esp.cpp which as relevant comments about it :

Code: Select alluint32_t EspClass::getFlashChipSizeByChipId(void) {
    uint32_t chipId = getFlashChipId();
     * Chip ID
     * 00 - always 00 (Chip ID use only 3 byte)
     * 17 - ? looks like 2^xx is size in Byte ?     //todo: find docu to this
     * 40 - ? may be Speed ?                        //todo: find docu to this
     * C8 - manufacturer ID
    switch(chipId) {

        // GigaDevice
        case 0x1740C8: // GD25Q64B
            return (8_MB);
        case 0x1640C8: // GD25Q32B
            return (4_MB);
        case 0x1540C8: // GD25Q16B
            return (2_MB);
        case 0x1440C8: // GD25Q80
            return (1_MB);
        case 0x1340C8: // GD25Q40
            return (512_kB);
        case 0x1240C8: // GD25Q20
            return (256_kB);
        case 0x1140C8: // GD25Q10
            return (128_kB);
        case 0x1040C8: // GD25Q12
            return (64_kB);

        // Winbond
        case 0x1640EF: // W25Q32
            return (4_MB);
        case 0x1540EF: // W25Q16
            return (2_MB);
        case 0x1440EF: // W25Q80
            return (1_MB);
        case 0x1340EF: // W25Q40
            return (512_kB);

            return 0;

If the ManufactuerID is unknown, then, it is better to rely only on first byte :

Code: Select alluint32_t EspClass::getFlashChipRealSize(void)
    return (1 << ((spi_flash_get_id() >> 16) & 0xFF));

So, your chip should be a 4MB ...
User avatar
By elmar
#35632 Hi Don,

You wrote "manufacturer 0xe0 (WinBond)" but the link You provide in the same message states that Winbond manufacturer ID is EFh (0xef).
Manufacturer ID 0xe0 seems to be LG Semiconductor, but I can't find any flash memory datasheet for that manufacturer.