forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/esp32c5_xtal_support' into 'master'
feat(clk): support ESP32C5 XTAL 40M/48M selection Closes IDF-8943 See merge request espressif/esp-idf!31409
- Loading branch information
Showing
29 changed files
with
270 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_40 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
Note: On ESP32, the XTAL_FREQ_AUTO option allows the ESP target to automatically estimating XTAL clock's | ||
operating frequency. The ESP32 uses the internal 8MHZ as a reference when estimating. Due to the internal | ||
oscillator's frequency being temperature dependent, usage of the XTAL_FREQ_AUTO is not recommended in | ||
applications that operate in high ambient temperatures or use high-temperature qualified chips and modules. | ||
|
||
config XTAL_FREQ_26 | ||
bool "26 MHz" | ||
config XTAL_FREQ_32 | ||
bool "32 MHz" | ||
config XTAL_FREQ_40 | ||
bool "40 MHz" | ||
config XTAL_FREQ_AUTO | ||
bool "Autodetect" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 26 if XTAL_FREQ_26 | ||
default 32 if XTAL_FREQ_32 | ||
default 40 if XTAL_FREQ_40 | ||
default 0 if XTAL_FREQ_AUTO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_40 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
config XTAL_FREQ_26 | ||
bool "26 MHz" | ||
config XTAL_FREQ_40 | ||
bool "40 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 26 if XTAL_FREQ_26 | ||
default 40 if XTAL_FREQ_40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_40 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
config XTAL_FREQ_40 | ||
bool "40 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 40 if XTAL_FREQ_40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_48 if IDF_TARGET_ESP32C5_BETA3_VERSION | ||
default XTAL_FREQ_AUTO | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
Note: ESP32C5 supports crystal frequencies of 40 MHz and 48 MHz. With XTAL_FREQ_AUTO option, boot | ||
mode together with MTMS pin, EFUSE_XTAL_48M_SEL, and EFUSE_XTAL_48M_SEL_MODE collectively control | ||
the crystal frequency, and record to PCR_CLK_XTAL_FREQ register field. | ||
|
||
config XTAL_FREQ_AUTO | ||
depends on IDF_TARGET_ESP32C5_MP_VERSION | ||
bool "Autodetect" | ||
config XTAL_FREQ_40 | ||
depends on IDF_TARGET_ESP32C5_BETA3_VERSION | ||
bool "40 MHz" | ||
config XTAL_FREQ_48 | ||
depends on IDF_TARGET_ESP32C5_BETA3_VERSION | ||
bool "48 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 0 if XTAL_FREQ_AUTO | ||
default 40 if XTAL_FREQ_40 | ||
default 48 if XTAL_FREQ_48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_40 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
config XTAL_FREQ_40 | ||
bool "40 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 40 if XTAL_FREQ_40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_40 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
config XTAL_FREQ_40 | ||
bool "40 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 40 if XTAL_FREQ_40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_32 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
config XTAL_FREQ_32 | ||
bool "32 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 32 if XTAL_FREQ_32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
choice XTAL_FREQ | ||
prompt "Main XTAL frequency" | ||
default XTAL_FREQ_40 | ||
help | ||
This option selects the operating frequency of the XTAL (crystal) clock used to drive the ESP target. | ||
The selected value MUST reflect the frequency of the given hardware. | ||
|
||
config XTAL_FREQ_40 | ||
bool "40 MHz" | ||
endchoice | ||
|
||
# soc_xtal_freq_t enum in soc/clk_tree_defs.h lists the XTAL frequencies can be supported | ||
# SOC_XTAL_SUPPORT_XXX in soc_caps.h lists the XTAL frequencies already supported | ||
config XTAL_FREQ | ||
int | ||
default 40 if XTAL_FREQ_40 |
Oops, something went wrong.