Giter Club home page Giter Club logo

Comments (8)

zhivko avatar zhivko commented on July 28, 2024

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.

me-no-dev avatar me-no-dev commented on July 28, 2024

@zhivko try holding the boot button (GPIO0 low) while trying to flash. Some boards have issues resetting properly.

from arduino-esp32.

zhivko avatar zhivko commented on July 28, 2024

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
img_20161120_123814
On this scope image yellow line is EN, and blue line is io0.

from arduino-esp32.

zhivko avatar zhivko commented on July 28, 2024

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.
img_20161120_215540

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.

zhivko avatar zhivko commented on July 28, 2024

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.

penfold42 avatar penfold42 commented on July 28, 2024

Looks like gpio11 is used for flash
http://www.esp32.com/viewtopic.php?t=400

from arduino-esp32.

zhivko avatar zhivko commented on July 28, 2024

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.

penfold42 avatar penfold42 commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.