Skip to content

v3.0.0 detects / defaults to wrong XTAL frequency on ESP32-D0WDQ6-V3 - millis and UART baud are not correct #9837

Open
@PaulZC

Description

@PaulZC

Board

SparkFun ESP32 Thing

Device Description

The SparkFun ESP32 Thing is a 3rd Party Board based on the ESP32-D0WDQ6-V3 chip with a 26MHz XTAL

https://www.sparkfun.com/products/13907

image

Hardware Configuration

Only USB

Version

v3.0.0

IDE Name

Arduino IDE

Operating System

Windows

Flash frequency

80MHz

PSRAM enabled

no

Upload speed

921600

Description

A full write-up, diagnosis and fix available at: sparkfun/ESP32_Thing_Plus#7

In cores below 3.0.0, the XTAL frequency was detected correctly. millis and UART baud rates were correct.

From 3.0.0, the XTAL frequency is detected as or defaults to 40MHz. millis and UART baud rates are off by a factor of 1.54.

Using the Serial_All_CPU_Freqs example:

For the 2.0.17 version it produces ...
CPU Freq = 240 MHz
XTAL Freq = 26 MHz
APB Freq = 80000000 Hz

For the 3.0.1 version it produces ...
CPU Freq = 240 MHz
XTAL Freq = 40 MHz
APB Freq = 80000000 Hz

We have a work-around:

#include "soc/rtc.h"

  rtc_clk_xtal_freq_update((rtc_xtal_freq_t)26);
  rtc_clk_cpu_freq_set_xtal();
  setCpuFrequencyMhz(240);

But it would be really nice if the core could be corrected / updated... Thanks!

Sketch

https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/Serial/Serial_All_CPU_Freqs/Serial_All_CPU_Freqs.ino

Debug Message

N/A

Other Steps to Reproduce

N/A

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions