Closed hicham-vv closed 2 years ago
I'm not expert on PlatformIO, but is it possible to change the upload speed to a lower one and try again?
I know that with Arduino IDE there is a menu option for it ("Menu->tools->Upload Speed->921600"). It can be set for the following options: 921600, 115200, 256000, 230400 and 512000. Maybe, just to verify your ESP chip / UART-USB chip, you can give it a try with the Arduino IDE.
Other possible problems are related to the USB cable quality, ESP board issues, USB port/connector on the PC, Power stability.
hello @SuGlider thank you for your reply but i tried changing speed with both platformIO and Arduino IDE but still getting the same issues
Maybe it is a hardware/cable issue?
maybe,:( i have checked all the wires and voltages, nothing doubtful
Something else to try would be to wipe out the flash with Flash Download Tool.
thank you let me test that
it is also possible with CLI esptool.py https://docs.espressif.com/projects/esptool/en/latest/esp32s3/esptool/basic-commands.html#erase-flash-erase-flash-erase-region
Sir it didn't succeed
Do you mean that flash erase didn't succeed at all or that erase finished fine but you still can't flash it with your firmware?
I see. I think that maybe the flash in the board is gone... Do you have another board to test it?
A last resource woud be to try different combinations of SpiFlashConfig for SPI SPEED and SPI MODE in the Flash Tool when trying to erase it.
hello, i tried with another board that have the same esp,driver,flash,memory, and its succeed but with that one who have the problem i still got nothing
I think that the board with the issue has indeed a hardware failure in its flash. If so, there is nothing we can do about it. Maybe replace Flash chip, but not sure if it is viable.
I'm noticing that if I touch boot button it will boot then flashing memory will start. sometimes the flashing done and the sketch work perfectly, but in the most of case uploading code stops at the midle of the operation, as you see below, I'm wondering if the issue is do with floating pins needing to float to ground and holding the BOOT button simply extends the period the pins are given to reach ground. or the the esp32 communicate badly with the flash memory.
Connecting..... Chip is ESP32-D0WDQ6 (revision 1) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 98:f4:ab:6c:61:80 Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed. Configuring flash size... Flash will be erased from 0x00001000 to 0x00005fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x0000e000 to 0x0000ffff... Flash will be erased from 0x00010000 to 0x00048fff... Compressed 17216 bytes to 11867... Writing at 0x00001000... (100 %) Wrote 17216 bytes (11867 compressed) at 0x00001000 in 0.6 seconds (effective 244.4 kbit/s)... Hash of data verified. Compressed 3072 bytes to 128... Writing at 0x00008000... (100 %) Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 402.8 kbit/s)... Hash of data verified. Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 556.5 kbit/s)... Hash of data verified. Compressed 232192 bytes to 126659... Writing at 0x00010000... (12 %) Writing at 0x0001e4e8... (25 %) Writing at 0x000242d9... (37 %)
A fatal error occurred: Invalid head of packet (0x46) *** [upload] Error 2
Try to install an other driver
hello, i tried with another board that have the same esp,driver,flash,memory, and its succeed but with that one who have the problem i still got nothing
If another board works with exactly the same configurations you are using for the board that doesn't work and both boards are the same, I think that it makes it clear that the issue is in the board itself.
I'll close the issue in a couple days in case there are no more news regarding this issue.
you need to select the files to been upload. Take a look at this basic setting that worked for me.
If you want to advance it you could do it like this...
this can be probably closed as an HW issue, awaiting of author approval. Thanks for understanding and contribution!
Closing the issue.
i think it's an hardware issue, i just supply the esp from 3.3V to 2.6V, then i can upload the code normally !!!
Slowing the upload speed fixed this for me. Tools -> Upload speed
I'm not expert on PlatformIO, but is it possible to change the upload speed to a lower one and try again?
I know that with Arduino IDE there is a menu option for it ("Menu->tools->Upload Speed->921600"). It can be set for the following options: 921600, 115200, 256000, 230400 and 512000. Maybe, just to verify your ESP chip / UART-USB chip, you can give it a try with the Arduino IDE.
Other possible problems are related to the USB cable quality, ESP board issues, USB port/connector on the PC, Power stability.
Thank you so much for this suggestion @SuGlider! This worked for me. I was having trouble getting a SparkFun ESP32 Thing Plus C working on this SparkFun IoT Brushless Motor Driver board.
I'm running macOS Sonoma (14.3.1) on an Apple M3 Pro. Below are the steps I took to get my basic Hello World sketch to upload properly:
However I was still getting this error when trying to upload a basic sketch:
A fatal error occurred: Unable to verify flash chip connection (Invalid head of packet (0xA6): Possible serial noise or corruption.).
Failed uploading: uploading error: exit status 2
Upload Speed of 115200, 230400, or 460800 all work but 921600 doesn't.
I'm actually unsure if I even needed to do the CH340 driver installation or if there is already some sort of support on Apple silicon Macs for the CH340 chip. SparkFun didn't have any information specifically about Apple silicon.
Board
esp32 dev
Device Description
Nothing only some Bottons and leds
Hardware Configuration
GPIO0:Pulledup to 3.3V via 10K resistor, GPIO2: Connected to led GPIO6---->GPIO11 Connected to Flash Memory GPIO12: Not connected
Version
other
IDE Name
Platfrom IO
Operating System
windows 10
Flash frequency
40 Mhz
PSRAM enabled
no
Upload speed
default speed of platform IO
Description
Hello ESP32 lovers, I am facing a problem with my esp32 Chip is ESP32-D0WDQ6 (revision 1), I tried to flash it but I didn't succeed. so if i let it to enter to the mode boot automatically , it stuck in "connecting .......___...... after some seconds it give me a the message error "A fatal error occurred: Timed out waiting for packet header " but when i try to hold Boot botton so i can connect boot to GND, it begin flashing but suddenly the operation stops and it give me this error, please any ideas thank you " Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 551.3 kbit/s)... Hash of data verified. Compressed 232192 bytes to 126659... Writing at 0x00010000... (12 %) Writing at 0x0001e4e8... (25 %)
A fatal error occurred: Invalid head of packet (0x46) "
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide