New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to flash programs to esp32c6 getting "A fatal error occurred: Failed to connect to ESP32-C6: Invalid head of packet (0x66): Possible serial noise or corruption." error (IDFGH-12387) #13415
Comments
Do you experience the same issue without Joulescope connected? What esptool version are you using? Please add the |
I see only 5 cables going to the module. What is missing? You can invoke esptool directly. You see the command in the output of |
And please send the respose as text file and not as screenshot. |
this is what I'm getting when giving esptool.py --chip esp32c6 --trace write_flash what should be @flash_args ? on giving com as address and deep_sleep bin file as filename, PS C:\Espressif\frameworks\esp-idf-v5.2.1-2\examples\system\deep_sleep\build> esptool.py --chip esp32c6 --trace write_flash 6 deep_sleep.bin also the esptool version is, esptool.py v4.7.0 |
It should be passed as is. It would take the arguments from that file. It doesn't matter. From the output it is clear that reset works but it won't put the chip into download mode. There is some issue with the Boot connection. It might help to hold the BOOT button when starting
The Boot pin for ESP32-C6 is IO9 if I'm not mistaken. |
I've changed boot pin to 1O9, still seeing same error, "A fatal error occurred: Failed to connect to ESP32-C6: Invalid head of packet (0x69): Possible serial noise or corruption." I've first given the boot to IO0 where there was 3V supply, now I've moved it to IO9, does previously giving 3V on IO0 affects anyway? below is the response I'm getting on giving "esptool.py --chip esp32c6 --trace write_flash @flash_args " command. PS C:\Espressif\frameworks\esp-idf-v5.2.1-2\examples\system\deep_sleep> cd build [ ...] esptool write_flash: error: the following arguments are required: |
Hi @dobairoland, |
Yep, sorry. On Windows you need apostrophes as well, i.e. If you insist on flashing modules separately then you can experience such issues. Development boards have additional circuitry to ensure that the chip can be put automatically into download mode. This is obviously not working for you. You need to put the chip manually into download mode. You can read more about this at: https://docs.espressif.com/projects/esptool/en/latest/esp32c6/advanced-topics/boot-mode-selection.html#manual-bootloader (the whole page might be useful for you). As I pointed out earlier, this can be achieved by holding the BOOT button while running the flashing command. I'm closing this issue because I don't think anything can be done on the software side. |
I tried programming on the development board, but on j5, the current measurement rail. On deep sleep I'm measuring 70uA whereas the datasheet number is 7uA, that's why I moved the evaluation to the module, also the EVK doesn't have an external antenna to evaluate RF parameters of esp32-c6. I've tries holding BOOT button while programming the device but was facing the same error as "invalid header or packet". anyway thanks for your response, please update if there is any further debug to be done. Thanks Again |
You can try to pull down GPIO9 by connecting it to GND. You don't have to use the BOOT button. GPIO8 must be pulled up (https://docs.espressif.com/projects/esptool/en/latest/esp32c6/advanced-topics/boot-mode-selection.html#gpio8). |
I have pulled down IO9 by connecting it to GND and have connected IO8 to BOOT, After that on flashing, below is the response I'm getting, the device is not going to the intended state, C:\Espressif\frameworks\esp-idf-v5.1.2\examples\system\deep_sleep>idf.py -p COM6 flash Leaving... |
No, that has to be connected to VCC, not BOOT. But since you flashed once successfuly, now you can do your measurements with deep sleep. |
This is from the datasheet of C6: https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf |
even though I have the previous shared response, the device is not going to sleep, on giving monitor, below response is what I'm getting, Enabling timer wakeup, 20s now if I press the BOOT button, it only gives continues log, but still not going to deep sleep |
This is download mode. This is needed for flashing. See "waiting for download". You need normal operation mode to application to be executed from flash (SPI boot). |
so after flash, I should keep I08 floating and 109 at boot pin? |
Hi @dobairoland, I can only flash the device in Download mode but then it is not going to deep sleep state. How can I configure the module in different states like Deep Sleep? Regards, |
Not floating. It can be any value according to the table. Not boot pin but 1 (pull-up).
After flashing you need SPI Boot mode to boot into the application which will put it into deep sleep state. |
Is this possible in my case, If yes how? I tried to move the device from download mode to boot mode by pulling up GPIO9, But then the device is going into some other mode, reading current in nanoAmpheres and then rising it gradually. |
Hi,
as you suggested, I've flashed the image on the development board, but on configuring deep sleep, I'm measuring 53uA current on the dev kit but according to data sheet the expected Deep Sleep current is 7uA. |
Answers checklist.
General issue report
I was using ESP32-C6-MINI-1U with the ESP Prog.
made connections as per below image, as suggested by the document: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/current-consumption-measurement-modules.html#
But on issuing flash, I'm getting "A fatal error occurred: Failed to connect to ESP32-C6: Invalid head of packet (0x66): Possible serial noise or corruption." error and am not able to flash the programs to the device.
on issuing monitor getting the below response continuously,
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
Please help resolve this and program the module.
The text was updated successfully, but these errors were encountered: