File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
libraries/esp8266/examples/CheckFlashConfig Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ ESP8266 CheckFlashConfig by Markus Sattler
3
+
4
+ This sketch tests if the EEPROM settings of the IDE match to the Hardware
5
+
6
+ */
7
+
8
+ void setup (void ) {
9
+ Serial.begin (115200 );
10
+ }
11
+
12
+ void loop () {
13
+
14
+ uint32_t realSize = ESP.getFlashChipRealSize ();
15
+ uint32_t ideSize = ESP.getFlashChipSize ();
16
+ FlashMode_t ideMode = ESP.getFlashChipMode ();
17
+
18
+ Serial.printf (" Flash real id: %08X\n " , ESP.getFlashChipId ());
19
+ Serial.printf (" Flash real size: %u\n\n " , realSize);
20
+
21
+ Serial.printf (" Flash ide size: %u\n " , ideSize);
22
+ Serial.printf (" Flash ide speed: %u\n " , ESP.getFlashChipSpeed ());
23
+ Serial.printf (" Flash ide mode: %s\n " , (ideMode == FM_QIO ? " QIO" : ideMode == FM_QOUT ? " QOUT" : ideMode == FM_DIO ? " DIO" : ideMode == FM_DOUT ? " DOUT" : " UNKNOWN" ));
24
+
25
+ if (ideSize != realSize) {
26
+ Serial.println (" Flash Chip configuration wrong!\n " );
27
+ } else {
28
+ Serial.println (" Flash Chip configuration ok.\n " );
29
+ }
30
+
31
+ delay (5000 );
32
+ }
You can’t perform that action at this time.
0 commit comments