Comments (8)
Forgot to mention - I experience issue on ubuntu linux.
Now I tried on winfows and I get to:
Sketch uses 102,069 bytes (9%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 9,160 bytes (3%) of dynamic memory, leaving 285,752 bytes for local variables. Maximum is 294,912 bytes.
python.exe C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/esptool.py --chip esp32 --port COM3 --baud 115200 write_flash -z --flash_freq 80m --flash_mode dio 0x1000 C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/bin/bootloader.bin 0x8000 C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/bin/partitions_singleapp.bin 0x10000 C:\Users\klemen\AppData\Local\Temp\arduino_build_403827/blink.ino.bin
esptool.py v2.0-dev
Connecting...
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
So I guess I need to fix communication now.
I checked official devc from espressif and there is "Auto program" table in schematics it says:
dtr=0, rts=1 --> en==1, io0=0 so this is what I am getting, but still in arduino esp32 - I get:
Global variables use 9,160 bytes (3%) of dynamic memory, leaving 285,752 bytes for local variables. Maximum is 294,912 bytes.
python.exe C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/esptool.py --chip esp32 --port COM3 --baud 115200 write_flash -z --flash_freq 80m --flash_mode dio 0x1000 C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/bin/bootloader.bin 0x8000 C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/bin/partitions_singleapp.bin 0x10000 C:\Users\klemen\AppData\Local\Temp\arduino_build_629099/blink.ino.bin
esptool.py v2.0-dev
Connecting...
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
At the time when EN=0 and io0=1, tx and rx lines˙ from ftdi32 are not present anyhow... So what actually "waiting for packet header" means?
from arduino-esp32.
@zhivko try holding the boot button (GPIO0 low) while trying to flash. Some boards have issues resetting properly.
from arduino-esp32.
I also try gpio0 low, but according to scope trace this is what happens - io0 firmly low, but EN line doesn't make full switch from 3.3 to 0.
It seems reset should happen while io0 is low to make device go in flash mode. It seems EN line is problem on my board but cannot figure it why.
Schematics is taken from devC espressif, more info here:
http://esp32.com/viewtopic.php?f=2&t=430&p=2176#p2176
On this scope image yellow line is EN, and blue line is io0.
from arduino-esp32.
Ah finally. I had faulty ftdi adapter. With new one I could upload sketch ;).
On same board but another usb adapter (this time CP2102) reset en and gpio lines are like this.
Seems to work OK on arduino ide with following in boards.txt:
esp32.serial.disableDTR=true
esp32.serial.disableRTS=false
Sketch uses 102,069 bytes (9%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 9,160 bytes (3%) of dynamic memory, leaving 285,752 bytes for local variables. Maximum is 294,912 bytes.
python.exe C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/esptool.py --chip esp32 --port COM3 --baud 115200 write_flash -z --flash_freq 80m --flash_mode dio 0x1000 C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/bin/bootloader.bin 0x8000 C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/bin/partitions_singleapp.bin 0x10000 C:\Users\klemen\AppData\Local\Temp\arduino_build_629099/blink.ino.bin
esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Compressed 5264 bytes to 3363...
Writing at 0x00001000... (100 %)
Wrote 5264 bytes (3363 compressed) at 0x00001000 in 0.3 seconds (effective 141.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 78...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (78 compressed) at 0x00008000 in 0.0 seconds (effective 1445.7 kbit/s)...
Hash of data verified.
Compressed 225792 bytes to 67923...
Writing at 0x00010000... (20 %)
Writing at 0x00014000... (40 %)
Writing at 0x00018000... (60 %)
Writing at 0x0001c000... (80 %)
Writing at 0x00020000... (100 %)
Wrote 225792 bytes (67923 compressed) at 0x00010000 in 6.0 seconds (effective 302.8 kbit/s)...
Hash of data verified.
Leaving...
Great! thanks
from arduino-esp32.
Another question - I added led to my board to pin GPIO11.
I uploaded sketch, and I barely see led light instead of bright flashes - When I measured voltage on gpio11 - it shows constantly 1.57V.
So what's wrong with using gpio11 in blink example? Is gpio11 reserved for flash operations?
int ledPin = 11;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
}
void loop()
{
Serial.println("Hello, world!");
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
from arduino-esp32.
Looks like gpio11 is used for flash
http://www.esp32.com/viewtopic.php?t=400
from arduino-esp32.
Why they mark GPIO11 when it is flash reserved? Ughh...
So basically all this SD_ pins fall under same flash operation pins that user could not use since then flash would be useless?
SHD/SD2 17 GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD
SWP/SD3 18 GPIO10, SD_DATA3, SPIWP, HS1_DATA3, U1TXD
SCS/CMD 19 GPIO11, SD_CMD, SPICS0, HS1_CMD, U1RTS
SCK/CLK 20 GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS
SDO/SD0 21 GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS
SDI/SD1 22 GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS
from arduino-esp32.
Assuming the esp32 is similar to the esp8266, under some circumstances they can be used.
There a different flash chip IO modes - DIO, QIO that use all or some subset of the pins to communicate.
from arduino-esp32.
Related Issues (20)
- WiFi.status() always reports WL_STOPPED although connected HOT 6
- ledcWrite() has no option to write a LED-duty to a channel, but only to a specific pin HOT 3
- Add default 16MB partition to esp32wroverkit HOT 1
- 4-mic setup resulting in static and quiet audio HOT 3
- Segment clash error during linking HOT 2
- Arduino_GFX_Library not recognized HOT 4
- v3.0 couldn't keep the correct serial port with Arduino Nano ESP32 once RST button is pressed HOT 13
- HttpClient can not make https requests to some GMSA root CA signed server, TLS handshake failed with error code 0x2080 by mbedtls
- Repeat Timer example broken for 3.0.2 HOT 1
- Core crashes in Adafruit NeoMatrix matrixtest example sketch (32x8 matrix panel) HOT 1
- rtc timestamp, and not update HOT 1
- [Zigbee][XIAO_ESP32C6] Loop restart with Zigbee_Temperature_Sensor.ino example HOT 2
- SD MMC does not initialize when powered by external battery but works fine while powered by USB through PC. HOT 4
- ESP Rainmaker does not work with esp32c3 HOT 3
- Calling nvs_flash_deinit() Causes WiFi.begin() to Fail HOT 2
- Compilation Error with digitalPinCanOutput(pin) After Update from 2.0.14 to 3.0.3
- Issue with Heltec LoRa ESP32 V2 Not Connecting to TTN Server HOT 1
- git clone failed HOT 3
- 内存泄漏 HOT 1
- Cannot build due to "ERROR: Because project depends on idf (>=5.1.0,<5.2.0) which doesn't match" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-esp32.