PlatformIO Community

Problems writing a program


#1

When designing software for ESP32, the module used Wi-Fi module LuaNode32 with ESP-32. Now I transfer the project to my board with ESP32-WROOM32. There was a problem - I can not write the code in ESP32.
Log:

Processing esp32dev (framework: arduino; platform: espressif32; board: esp32dev)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz 320KB RAM (4MB Flash)
DEBUG: CURRENT(esp-prog) EXTERNAL(esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 26 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <WiFi> 1.0
|-- <Preferences> 1.0
|-- <SPIFFS> 1.0
|   |-- <FS> 1.0
|-- <FS> 1.0
Linking .pioenvs\esp32dev\firmware.elf
Retrieving maximum program size .pioenvs\esp32dev\firmware.elf
Checking size .pioenvs\esp32dev\firmware.elf
Building .pioenvs\esp32dev\firmware.bin
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [=         ]  11.8% (used 38712 bytes from 327680 bytes)
PROGRAM: [======    ]  56.3% (used 738518 bytes from 1310720 bytes)
esptool.py v2.6
Configuring upload protocol...
AVAILABLE: esp-prog, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: COM3
Uploading .pioenvs\esp32dev\firmware.bin
esptool.py v2.6
Serial port COM3
Connecting.....
Chip is ESP32D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 24:0a:c4:81:77:2c
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
Compressed 16176 bytes to 10658...
*** [upload] Error 2
A fatal error occurred: Timed out waiting for packet content

What to do?


#2

Isn’t the ESP32-WROOM32 just the bare module? What actual board are you using, or is a custom board with a ESP32-WROOM32 on it?

Addendum: Also, maybe try board = esp-wrover-kit in your platform.ini file… as it seems that is the definition for your board… if that makes any difference?


#3

Thank you very much for your response. Now I apologize, but you are wrong. Problem found. In 20 minutes I will describe it.


#4

For unknown reasons, if there is a high level (2.8V) on the pin IO12, the ESP32-WROOM32 module does not want to record the program and Serial (Serial0) does not work.


#5

This is a bootloader pin as described in https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#other-pins.

May prevent flashing and/or booting if 3.3V flash is used and this pin is pulled high, causing the flash to brownout. See the ESP32 datasheet for more details.


#6

Thank you so much! This pin can not be used at all.


#7

Glad you worked out the problem. GPIO12 isn’t unusable, just make sure it isn’t pulled high at boot. i.e. it wouldn’t be suitable for use as the i2c bus, as that needs pullups. The same as if you had a button on it, you would want to work with the button pulling up when you press it, so that the normal state is low. It’s no different to GPIO15 on the ESP8266… it should not be pulled high at boot, but once you’re past there, it’s fine. Sometimes it is handy using a special purpose GPIO - GPIO0 on the ESP8266 goes into programming mode when held low at boot… so I use it as a user button which also forces programming mode if OTA ever falls over.

Out of curiosity, what bit of my reply was wrong? Or did you simply mean that didn’t solve your problem?


#8

My board - ESP32-WROOM32.