Is it possible to disable ADC?
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Is it possible to disable ADC?
Is it possible to disable ADC function after use ADC to reduce power in sleep mode?
- OlivierLenoir
- Posts: 126
- Joined: Fri Dec 13, 2019 7:10 pm
- Location: Picardie, FR
Re: Is it possible to disable ADC?
Did you try to deinit ADC and Pin?
or maybe this method:
Code: Select all
from machine import ADC
pin_adc = Pin(32)
adc = ADC(pin_adc)
# your code
adc.deinit()
pin_adc.deinit()
Code: Select all
from machine import ADC
adc = ADC(Pin(32))
# your code
adc.deinit()
Olivier Lenoir
https://gitlab.com/olivierlenoir
https://gitlab.com/olivierlenoir
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Is it possible to disable ADC?
There is no deinit() method in ESP32's ADC now.
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: Is it possible to disable ADC?
Finally I found a way to disable ADC by set registry 0x3FF4880C.
Code: Select all
def disableADC():
mem32[0x3FF4880C] &= 0xFFF3FFFF
mem32[0x3FF4880C] |= 0x00020000