Assistance: Incapable to upload a single sketch in Arduino.
Posted: Fri Jun 16, 2017 9:56 am
Hi,
I would like to ask for some help… as I am new in this platform and declaring myself stupid… not been able to run a single sketch in Arduino.
What is happening, is that after upload a sketch (normally he wify Scan or the blink), when I press reset, I cannot see anything in the serial, and after a couple of seconds, the WDT resets the chip…
IF I try the uploading the same sketch with the ModeMCU board (V1.0 or V0.9) everything works perfectly.
So that’s the boards:
-I have around several ESP-12E, adquired in different moments of time (Ebay, DealExtreme and Bangood), so I marked them with letters, so I have
--Batch A: 10 units (tested around 5)
--Batch B: 2 Units (Tested 2)
--Batch C: 1 Unit (Tested 1)
--Bath D: 2 Units (not tested yet)
--Two ModeMCU V1.0 (samples tested and working properly)
--Two ModeMCE V0.9 (Samples tested and working Propoerly)
-Most of them (batch A and B) has 100uF Electrolytic capacitor for the spikes and ceramic capacitor for filtering (I also have some ESP-12E with the electrolic capacitor soldered to VCC and GND.
-I rely on the power supply (see pictures) as it can deliver a couples of amps without problem.
-I did not tested the power supply with the oscilloscope (TO-DO)
-Trials done on Windows 7, 10 and XP using Arduino v1.8.2(portable, non-administrator mode) and ESP Arduino core V2.3.0 (I also tried with the V2.2.0)
I am almost one month trying different circuits and connections: wires, solderless breakout boards and finally soldered breakout boards, alqays with the same. The latest one is the one bellow.
Its following the ModeMCU v0.9… with only one resistor for pulling-up/down (15k resistor… the ones that I has around) …. I realised that for the ModeMCU v1.0 there are a low ohm resistor before the gGND/VCC (don’t know the reason)
PHOTOS OF MY SETUP
I also added bouncing capacitor to the reset button.
The modules work perfectly before flashing them with Arduino, they are responsive to the AT commands. For example, here bellow some info before and after uploading the Arduino Sketch:
Then, In the arduino I select te Board ModeMCU V1.0 (ESP-12E) (I also Tried with ModeMCU V0.9), and I got this:
After flashing, they enter in the WDT reset loop,
I can reprogram them, also I can flash the AT firmware and they work properly, So I discard a corrupt eeprom, I mean, the ESP bootloader is responsive.
The sequence that I am following is the next.
I also tried inverting 5 and 6. Maybe I am doing something wrong in this sequence. Is there any additional configuration on the Arduino?
Also, sometimes, when I choose the generic ESP8266 board, I play with the options, and it happens that when I am uploading the sketch it get stuck in the last bar:
And again, after I reset… WDT reset Loop:
Any tip, indication, help or guidance will be more than welcome… What I am doing wrong??
Thanks a lot for your support.
Regards.
I would like to ask for some help… as I am new in this platform and declaring myself stupid… not been able to run a single sketch in Arduino.
What is happening, is that after upload a sketch (normally he wify Scan or the blink), when I press reset, I cannot see anything in the serial, and after a couple of seconds, the WDT resets the chip…
IF I try the uploading the same sketch with the ModeMCU board (V1.0 or V0.9) everything works perfectly.
So that’s the boards:
-I have around several ESP-12E, adquired in different moments of time (Ebay, DealExtreme and Bangood), so I marked them with letters, so I have
--Batch A: 10 units (tested around 5)
--Batch B: 2 Units (Tested 2)
--Batch C: 1 Unit (Tested 1)
--Bath D: 2 Units (not tested yet)
--Two ModeMCU V1.0 (samples tested and working properly)
--Two ModeMCE V0.9 (Samples tested and working Propoerly)
-Most of them (batch A and B) has 100uF Electrolytic capacitor for the spikes and ceramic capacitor for filtering (I also have some ESP-12E with the electrolic capacitor soldered to VCC and GND.
-I rely on the power supply (see pictures) as it can deliver a couples of amps without problem.
-I did not tested the power supply with the oscilloscope (TO-DO)
-Trials done on Windows 7, 10 and XP using Arduino v1.8.2(portable, non-administrator mode) and ESP Arduino core V2.3.0 (I also tried with the V2.2.0)
I am almost one month trying different circuits and connections: wires, solderless breakout boards and finally soldered breakout boards, alqays with the same. The latest one is the one bellow.
Its following the ModeMCU v0.9… with only one resistor for pulling-up/down (15k resistor… the ones that I has around) …. I realised that for the ModeMCU v1.0 there are a low ohm resistor before the gGND/VCC (don’t know the reason)
PHOTOS OF MY SETUP
I also added bouncing capacitor to the reset button.
The modules work perfectly before flashing them with Arduino, they are responsive to the AT commands. For example, here bellow some info before and after uploading the Arduino Sketch:
Code: Select all
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4
tail 8
chksum 0xc0
csum 0xc0
2nd boot version : 1.4(b1)
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000
Then, In the arduino I select te Board ModeMCU V1.0 (ESP-12E) (I also Tried with ModeMCU V0.9), and I got this:
Code: Select all
Sketch uses 226729 bytes (21%) of program storage space. Maximum is 1044464 bytes.
Global variables use 31936 bytes (38%) of dynamic memory, leaving 49984 bytes for local variables. Maximum is 81920 bytes.
C:\Users\Fleming\Documents\ArduinoData\packages\esp8266\tools\esptool\0.4.9/esptool.exe -vv -cd nodemcu -cb 115200 -cp COM3 -ca 0x00000 -cf C:\Users\Fleming\AppData\Local\Temp\arduino_build_334125/WiFiScan.ino.bin
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM3
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
Uploading 230880 bytes from C:\Users\Fleming\AppData\Local\Temp\arduino_build_334125/WiFiScan.ino.bin to flash at 0x00000000
erasing flash
size: 0385e0 address: 000000
first_sector_index: 0
total_sector_count: 57
head_sector_count: 16
adjusted_sector_count: 41
erase_size: 029000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 15000 ms
setting serial port timeouts to 1000 ms
espcomm_send_command: receiving 2 bytes of data
writing flash
................................................................................ [ 35% ]
................................................................................ [ 70% ]
.................................................................. [ 100% ]
starting app without reboot
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
After flashing, they enter in the WDT reset loop,
Code: Select all
ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
I can reprogram them, also I can flash the AT firmware and they work properly, So I discard a corrupt eeprom, I mean, the ESP bootloader is responsive.
The sequence that I am following is the next.
Code: Select all
1-Plug USB-Serial adapter (only ground shared and it’s 3.3v ttl)
2-I provide power
3-Run Arduino
4-On the boards manager, I choose or Generic ESP8266 or ESP12-E (ModeMCU v1) or ESP-12 (ModeMCU V0.9), doesn’t matter.
5-I press the Prog button, and then the reset button, and the release the two buttons. I notice in the serial that the chip enters in mode (1,7) or (1.6)
6-I click on the “Upload Scketch” a the Arduino, then the lights start flashing, and when completed the three bars (35%, 70%, 100%)
7-Then I press reset button
8-Then WDT reset loop.
I also tried inverting 5 and 6. Maybe I am doing something wrong in this sequence. Is there any additional configuration on the Arduino?
Also, sometimes, when I choose the generic ESP8266 board, I play with the options, and it happens that when I am uploading the sketch it get stuck in the last bar:
Code: Select all
............................................................................... [ 35% ]
................................................................................ [ 70% ]
................................................................. read 0, requested 1
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
And again, after I reset… WDT reset Loop:
Code: Select all
ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
Any tip, indication, help or guidance will be more than welcome… What I am doing wrong??
Thanks a lot for your support.
Regards.