Unable to program ESP32-MINI-1 modules

FrancisL
Posts: 21
Joined: Wed Jul 25, 2018 3:34 pm

Unable to program ESP32-MINI-1 modules

Postby FrancisL » Wed Mar 03, 2021 4:49 pm

We manufactured some boards based on the ESP32-MINI-1 module.
When we try to program them, we get the following error: <<A fatal error occurred: Timed out waiting for packet header>>.
A strange warning message is:
WARNING: Detected crystal freq 38.36MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?

We tried with different boards, and the 38.xxMHz may vary from several hundred kHz. It seems that the chip is running with an internal RC,..or the internal oscillator is very unstable... Is that possible??

We installed the latest esp-idf: v4.4-dev-4-g73db14240 and tried with the same result with an older V4.1 (same result).

Below the full log:


Connecting....
Chip is ESP32-U4WDH (revision 3)
Features: WiFi, BT, Single Core, Embedded Flash, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 38.36MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz
MAC: f0:08:d1:e2:fa:b0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
A fatal error occurred: Timed out waiting for packet header

FrancisL
Posts: 21
Joined: Wed Jul 25, 2018 3:34 pm

Re: Unable to program ESP32-MINI-1 modules

Postby FrancisL » Wed Mar 03, 2021 5:33 pm

New test: if we lower the baud rate (115200Hz), we can program the 'Hellow World' program but the execution fails within the 'RTC calibration'...
We are now wondering whether the crystal is really @38MHz.

FrancisL
Posts: 21
Joined: Wed Jul 25, 2018 3:34 pm

Re: Unable to program ESP32-MINI-1 modules

Postby FrancisL » Thu Mar 04, 2021 12:15 pm

At the end it works. Things to know:
- only the release 4.2 informs that we have to configure as 'unicore'... but once the config done, it works even with esp-idf 4.1
- the error message about the wrong crystal frequency has to be ignored.
- the max accepted baudrate is 115200. The default 460kb does not work. Programming our 1.5MB code is much longer...

The only needed change on our firmware initialy developed for the legacy ESP32 (dual core) concerns the use of GPIO 16/17 (replaced by 9/10). We are now going to perform exhaustive tests, but it seems not too bad.

actuator
Posts: 1
Joined: Sun Mar 07, 2021 3:19 am

Re: Unable to program ESP32-MINI-1 modules

Postby actuator » Sun Mar 07, 2021 3:24 am

Hi, I'm attempting to do the same thing using PlatformIO. Can you help me with the necessary 'platformio.ini' settings? I can't seem to find a board that suits the ESP32-mini-1.

Thanks in advance.

Who is online

Users browsing this forum: No registered users and 36 guests