I found that there are two version of ESP8266-01 with different flash sizes.
I have a ESP8266-01 of blue PCB and a black one. I did not know what the difference was so far. In my predecessor project, trying to support the OTA update feature, I realized that the flash size was not enough to implement OTA functionality in some ESP8266-01.
After googling, I've found that the ESP8266-01 on the blue PCB has only 512 KB of flash memory.
Here is how to check the flash size of the module.
Of course, you can easily identify the size of the flash on a colored PCB.
However, you need to determine by code the flash size for the firmware to work properly. Because the firmware itself does not know the color of the module :)
Serial.print("Chip ID: ");
Serial.println(ESP.getFlashChipId());
Serial.print("Chip Real Size: ");
Serial.println(ESP.getFlashChipRealSize());
Serial.print("Chip Size: ");
Serial.println(ESP.getFlashChipSize());
Serial.print("Chip Speed: ");
Serial.println(ESP.getFlashChipSpeed());
Serial.print("Chip Mode: ");
Serial.println(ESP.getFlashChipMode());
ESP.getFlashChipSize() just returns the value of the configuration, not real. So, you should use ESP. getFlashChipRealSize() instead.
Two versions of ESP8266-01. Blue PCB has 512Kb of flash size.
No comments:
Post a Comment