WARNING: Detected crystal freq 13.54MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?

Hello there! I am new to Arduino and I recently bought an ESP8266 12E Development Board to try to connect to WIFI and try some stuff out. I have connected my esp8266 to my PC using a usb cable. I tried running the following code:

#include <ESP8266WiFi.h>

#ifndef STASSID
#define STASSID "my-ssid"
#define STAPSK "mypasswd"
#endif

const char* ssid = STASSID;
const char* password = STAPSK;

void setup() {
  Serial.begin(9600);

  Serial.println();
  Serial.println();
  Serial.print("Wait for WiFi... ");

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());

  delay(500);
}


void loop() {

  digitalWrite(2, HIGH);
  delay(200);
  digitalWrite(2, LOW);
  delay(2000);
}

The console shows: "WARNING: Detected crystal freq 13.54MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?" and also none of the print statements work, I see some boxes on the console.

My console output:

. Variables and constants in RAM (global, static), used 28268 / 80192 bytes (35%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ DATA     1504     initialized variables
╠══ RODATA   988      constants       
╚══ BSS      25776    zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 60267 / 65536 bytes (91%)
║   SEGMENT  BYTES    DESCRIPTION
╠══ ICACHE   32768    reserved space for flash instruction cache
╚══ IRAM     27499    code in IRAM    
. Code in flash (default, ICACHE_FLASH_ATTR), used 238864 / 1048576 bytes (22%)
║   SEGMENT  BYTES    DESCRIPTION
╚══ IROM     238864   code in flash   
esptool.py v3.0
Serial port COM6
Connecting....
Chip is ESP8266EX
Features: WiFi
WARNING: Detected crystal freq 13.54MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 48:e7:29:6d:1c:e1
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 273008 bytes to 200774...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 273008 bytes (200774 compressed) at 0x00000000 in 10.4 seconds (effective 209.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Note: I have installed the "CP2102" driver it says on the other side of the ESP to install and it also mentions to use baud rate 9600


Hi @lampropoulos.

Check to make sure "9600" is selected in the menu at the top right corner of the Serial Monitor panel. If not, select the correct baud rate and press the reset button on the board to restart the sketch program. Hopefully you will then see the expected "Wait for WiFi..." output in Serial Monitor.

Note that it is normal to see some boxes or other junk characters in Serial Monitor when the program starts running on an ESP8266 board. The reason is that the ROM bootloader on the ESP8266 microcontroller prints some debug output at 74880 baud, which becomes garbage output when you have Serial Monitor configured at another baud rate. But this is not a real problem because the bootloader's debug output is only useful for troubleshooting specific problems. So during normal operation it is correct to configure Serial Monitor for whatever baud rate the sketch is configured to use (9600 in this case).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.