EEVblog Electronics Community Forum
Electronics => Microcontrollers => Topic started by: Thane of Cawdor on July 08, 2017, 07:45:13 am
-
Hi everyone!
I'm having some difficulty uploading an Arduino sketch to the ESP12-E module using a standard Sparkfun FTDI USB-serial converter (getting a espcomm_upload_mem failed error). Are there any particular issues with the circuit I'm using to reset/program the ESP8266 (from the NodeMCU schematic https://raw.githubusercontent.com/nodemcu/nodemcu-devkit/master/Documents/NODEMCU_DEVKIT_SCH.png (https://raw.githubusercontent.com/nodemcu/nodemcu-devkit/master/Documents/NODEMCU_DEVKIT_SCH.png)
Thank you :)
-
Sparkfun has a list of things to check. Did you do these?
https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/discuss
-
RX on the esp must go to TX on the serial-usb-converter
TX go to RX
-
For ESP8266 programming, might worth to look also at this USB Programming adapter:
USBProgv8.4 (http://esp8266-projects.org/2017/05/esp8266-usb-programmer-usbprog-htm/)
-
If you're using USB for power, try an external supply instead. I've had problems with USB ports supplying enough current for the eeprom write operation to succeed on the esp8266.
-
For ESP8266 programming, might worth to look also at this USB Programming adapter:
USBProgv8.4 (http://esp8266-projects.org/2017/05/esp8266-usb-programmer-usbprog-htm/)
you can also program the esp8266 OTA (over the air) that is program it remotely with wifi.
complete isolation guaranteed !
-
For ESP8266 programming, might worth to look also at this USB Programming adapter:
USBProgv8.4 (http://esp8266-projects.org/2017/05/esp8266-usb-programmer-usbprog-htm/)
you can also program the esp8266 OTA (over the air) that is program it remotely with wifi.
complete isolation guaranteed !
Absolutely, OTA Programming is the best IF you are allowed to use OTA.
-
Thanks for the responses! Yes, I have made sure that TX/RX are connected the right way around, am using an external power source and did look through the setup guide but still having some issues (which curiously is quite intermittent if I click on the reset button about 2-3 times a second and manage to get the reset timing just right :-DD - although this defeats the purpose of the digital reset line I guess).
I just wanted to make sure there are no specific issues with the circuit I'm currently using before I purchase any new devices.
Will have a look into OTA - any particular things I should be looking out for here?
-
to program the chip OTA, you first have to download a program in it with the serial link.... then only it will be OTA
so we are at the same point !
take a look at the OTA examples of the arduino IDE.
edit: video about OTA
https://www.youtube.com/watch?v=GR2ZXyPaqMo (https://www.youtube.com/watch?v=GR2ZXyPaqMo)
-
You did not mention how you are trying to upload.. arduino IDE, esptool ? what flags baud rates? Or log output besides espcomm_upload_mem
-
Good in focus pictures of your hardware would help alot.
-
I would do what others mentioned.
Good clean power, no breadboards etc.
Use manual reset mode, not auto until you know the board works and communication works, first thing first.
Use 9600 baud for testing.
Use esptool and see if you can talk to the board, a simple flash check or erase etc. or something else that has verbose output
Loopback test your ftdi adapter via a terminal or putty, make sure it works.
-
power supply is key.
i had trouble with some esp8266 boards as well. slapping 470uf on the power rail solved that.
a usb connector is NOT a reliable power source !
-
Pictures.