Skip to content

ADC: Automatically disable SAR ADC when driver is dropped#5562

Open
JurajSadel wants to merge 4 commits into
esp-rs:mainfrom
JurajSadel:adc-sleep
Open

ADC: Automatically disable SAR ADC when driver is dropped#5562
JurajSadel wants to merge 4 commits into
esp-rs:mainfrom
JurajSadel:adc-sleep

Conversation

@JurajSadel

Copy link
Copy Markdown
Contributor

closes #2740

@bugadani

bugadani commented May 11, 2026

Copy link
Copy Markdown
Contributor

This should be done when the clock gets released. Right now I can drop the driver and only partially disable it, or I can try and call a fallible destructor that may refuse to work if something else needs the power domain, neither cases are particularly good.

@JurajSadel JurajSadel force-pushed the adc-sleep branch 2 times, most recently from 013a041 to e067390 Compare May 27, 2026 07:40
@MabezDev

Copy link
Copy Markdown
Member

We need to be a bit careful here too, ADC2 on most chips has a side channel for WiFi entropy, though I can't quite recall where I read that.

@JurajSadel JurajSadel changed the title ADC: Add try_disable ADC: Automatically disable SAR ADC when driver is dropped Jun 3, 2026
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.

ADC increases current consumption during deep sleep

3 participants