Flashing an ESP8266 ESP-14

When I was ordering new ESP8266 modules, I ordered ESP8266 ESP-14 modules in a rush. When I received them, I saw the port layout was very different. After some research I found out that the ESP8266 ESP-14 is a STMicro STM8S003F3P6 combined with a Expressif ESP8266-EX WiSoC. At page 25 of the STM8S003F3P6 manual you can see that it designates port M_PD6 as RX and M_PD5 as TX. I also noticed that the ESP was controlled via the Serial interface and the ESP RX and TX ports have to be connected vise versa for that.

Schematic for connecting the ESP8266 ESP-14

To flash the ESP-14 just use M_PD5 as RX, M_PD6 as TX, connect ESP_GPIO0 with a 10K resistor to 3.3v, connect ESP_VDD to 3.3v and connect GND. In my experience you have to create a soldered programmer with an external power supply that delivers 1A.

ESP8266 ESP-14 Flashing Scheme

Software for flashing the ESP8266 ESP-14 – Arduino IDE

If you are using the Arduino IDE, make sure you are on version 1.6.5 and you have added http://arduino.esp8266.com/staging/package_esp8266com_index.json in the preferences at ‘Additional Boards Manager URLs’. You can use these settings for flashing:

ESP8266 Flash Settings

Example code for the the ESP8266 ESP-14

Then, you can use this code to test if its working

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Serial.println("Test your ESP8266");
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("Tick");
  delay(500);
  Serial.println("Tack");
  delay(500);
}

After flashing the ESP8266 ESP-14, disconnect the 3.3v from ESP_GPIO0 and reboot the module, while remain the Serial Connection connected to your computer. You will see the Tick-Tack now.

Errors

If you get errors or your module keeps rebooting, please check:

  • your power supply, does it really deliver enough current?
  • your wiring, are the cables tightly connected?
  • your breadboard, in my experience, breadboards do not work for flashing an ESP8266 because of its poor connection surface

More information

I have used these sources to write my article:

Posted in Networking.

16 Comments

  1. Help pls . Board not found . i have ESP8266 ESP-14 , arduino pro mini , USB-UART( CP2102) , ver 1.6.4 , 1.6.5 not working .sory bad english =)

  2. Thanks Benjamin for this valuable info .. flashed perfectly.
    However, I am reaching out to ask you or your readers .. where you able to do anything after without STM programmer ?

    It was my first ESP and the guy over the counter sold me the ESP-14 .. big surprise that I cannot use GPIOs the “normal way”.

    Have you found a way to do something ? AT Commands?

    Best regards
    Jeff

    • Hi Jeff, I am also sort of “new” to the ESP world…and coding world in general, but I fell for buying 10 ESP-14 modules because like an idiot I thought 14 has to be better then 12….only when I got them did I do some research and found that it is a 8 bit STM chip using the ESP as the “wifi” part of the equation…:(… I have been spending most of my time on ESP-01s and love the low cost and simplicity….although anyone who thinks NodeMCU and lua is simple needs there head checked…
      Anyway back to the ESP14’s… The post above is very helpfull at getting to the ESP part of the chip and program it to your hearts content..however as you have probably found out you cant use any of the GPIOs as they are connected to the STM chip…. I have ordered a cheap chinese STM programmer so that I can try and program the chip… Part of my home automation project is a door open/closed sensor so I am wanting to use the ESP14s for that purpose….as the STM is such a low power consumtion that it can run on 2 AA for about a year…. what I am trying to do is program the STM to react to the door open and closed… then is connects internally via UART(serial) to the ESP chip using AT commands which will start wifi when needed and deep sleep when needed… which my Home Automation software (EasyIOT) has libraries for…
      Another option that I have got working is to wire up the ESP14 like the above project says…. then I connect it to an arduino and use the ESP chip part though UART(Serial)…You can then add wifi to any ardunio and use AT commands to communicate with your network…works great. PS…I use a arduino mega which has 4 serial UART…. any other arduino you need to use SoftSerial or download the latest NewSoftSerial..
      Have fun with your project

  3. This was really helpful at getting me started. But, in my case, and according to the reference picture above, you have to Ground GPIO 0, to program. That worked for me.

  4. OK !! it works fine Benjamin …
    I tested ESP-14 to connect to a MQTT Mosquitto broker. And it work pretty fine now.
    I had issues with the Run/Boot mode but now it is fine.

    One question,
    I am using now Arduino IDE, is it possible to directly use STM GPOI ports ?
    I see only GPIO-0 is out for ESP8866…

  5. Hi. I had a doubt.
    There is any possibility to use the ADC of the ESP? in Arduino? or you need to use the ADC of the STM8 an communicate to ESP for the Data?
    Regards

  6. How knows what the flash size is?

    2M (1M SPIFFS) seems to be wrong because any Arduino OTA script fails telling me that the flash size is 1M.

    Calling “ESP.getFlashChipRealSize()” in arduino also tells me that it has 1M of flash size.

    Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *