Skip to content

Fix(gpio): Keep XTAL32K off unless configured - #6075

Open
JurajSadel wants to merge 1 commit into
esp-rs:mainfrom
JurajSadel:gpio
Open

Fix(gpio): Keep XTAL32K off unless configured#6075
JurajSadel wants to merge 1 commit into
esp-rs:mainfrom
JurajSadel:gpio

Conversation

@JurajSadel

@JurajSadel JurajSadel commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Closes #5563

Changelog

esp-hal

  • Added: ESP_HAL_CONFIG_USE_XTAL32K opts in to external 32 kHz crystal (powers it, defaults slow clock, removes crystal pads from Peripherals)

Comment on lines +10 to +11
{ pin = 0, analog = { 0 = "XTAL_32K_N" }, lp = { 0 = "LP_GPIO0" } },
{ pin = 1, analog = { 0 = "XTAL_32K_P" }, lp = { 0 = "LP_GPIO1" } },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the lp columns aligned, please

Comment thread esp-hal/esp_config.yml
or any other function (including via `steal` / `AnyPin`) while the crystal is active.
When disabled (default), XTAL32K stays off so those pins can be used as hi-Z GPIO."
default:
- value: false

@bugadani bugadani Aug 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this goes against "esp-config does not change public API" so this will need @MabezDev 's approval. This could turn into a cargo feature if the API change is a problem.

@@ -0,0 +1,31 @@
//! Build-time configuration of the external 32 kHz crystal (XTAL32K).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very arbitrary folder for this... maybe move to soc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set pin as Hi-Z (input pin)

2 participants