Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flash info] Detailed flash information #678

Merged
merged 1 commit into from
Jan 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion src/WebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3992,8 +3992,49 @@ void handle_sysinfo() {
reply += F("<TR><TD>ESP Chip ID:<TD>");
reply += ESP.getChipId();

reply += F("<TR><TD>ESP Chip Freq:<TD>");
reply += ESP.getCpuFreqMHz();
reply += F(" MHz");

reply += F("<TR><TD>Flash Chip ID:<TD>");
reply += ESP.getFlashChipId();
uint32_t flashChipId = ESP.getFlashChipId();
// Set to HEX may be something like 0x1640E0.
// Where manufacturer is 0xE0 and device is 0x4016.
reply += F("Vendor: 0x");
String flashVendor(flashChipId & 0xFF, HEX);
flashVendor.toUpperCase();
reply += flashVendor;
reply += F(" Device: 0x");
uint32_t flashDevice = (flashChipId & 0xFF00) | ((flashChipId >> 16) & 0xFF);
String flashDeviceString(flashDevice, HEX);
flashDeviceString.toUpperCase();
reply += flashDeviceString;
uint32_t realSize = ESP.getFlashChipRealSize();
uint32_t ideSize = ESP.getFlashChipSize();

reply += F("<TR><TD>Flash Chip Real Size:<TD>");
reply += realSize / 1024;
reply += F(" kB");

reply += F("<TR><TD>Flash IDE Size:<TD>");
reply += ideSize / 1024;
reply += F(" kB");

reply += F("<TR><TD>Flash IDE speed:<TD>");
reply += ESP.getFlashChipSpeed() / 1000000;
reply += F(" MHz");

FlashMode_t ideMode = ESP.getFlashChipMode();
reply += F("<TR><TD>Flash IDE mode:<TD>");
switch (ideMode) {
case FM_QIO: reply += F("QIO"); break;
case FM_QOUT: reply += F("QOUT"); break;
case FM_DIO: reply += F("DIO"); break;
case FM_DOUT: reply += F("DOUT"); break;
default:
reply += F("Unknown"); break;
}


reply += F("</table></form>");
addFooter(reply);
Expand Down