/*
* Chip ID & Chip Size get
*/
void setup() {
delay(1000);
Serial.begin(115200);
}
void loop() {
uint32_t chipId;
uint32_t chipSize;
uint32_t chipSizeK;
int chipSizeM;
/*
* Chip ID
* 00 - always 00 (Chip ID use
only 3 byte)
* 17 - 2^xx is size in Byte
* 40 - memory Type
* C8 - manufacturer ID
*/
chipId = ESP.getFlashChipId();
Serial.print("getFlashChipId=");
Serial.print(chipId,HEX);
delay(100);
chipSize = ESP.getFlashChipSizeByChipId();
chipSizeK = chipSize/1024;
chipSizeM = chipSizeK/1024;
Serial.print(" getFlashChipSizeByChipId=");
Serial.print(chipSize);
Serial.print("Bytes[");
Serial.print(chipSizeM);
Serial.print("MBytes]");
delay(100);
chipSize = ESP.getFlashChipRealSize();
chipSizeK = chipSize/1024;
chipSizeM = chipSizeK/1024;
Serial.print(" getFlashChipRealSiz=");
Serial.print(chipSize);
Serial.print("Bytes[");
Serial.print(chipSizeM);
Serial.println("MBytes]");
delay(1000);
}
|