Page 1 of 1

analogSetAttenuation(ADC_11db); bricked my ESP32-WRover-B

Posted: Sun Jan 12, 2020 10:37 am
by Duncro
Was trying to fix an issue with read analogue getting ghost values even with pulldown resistors, so made a quick sketch.
Tried adding analogSetAttenuation to the test sketch to fix it, now the moduel is dead, ntoeven being seen on the com port.

Code: Select all

const int
    C1 = 25,
    C2 = 33,
    C3 = 32;
int read1,read2,read3;

void setup() {
  Serial.begin(115000);
  // put your setup code here, to run once:
  pinMode(C1, INPUT);
  pinMode(C2, INPUT);
  pinMode(C3, INPUT);
  analogSetAttenuation(ADC_11db); <adding this bricked the module
}

void loop() {
  // put your main code here, to run repeatedly:
  read1 = analogRead(C1);
  read2 = analogRead(C2);
  read3 = analogRead(C3);
  Serial.println((String)read1+":"+(String)read2+":"+(String)read3);
  delay(100);
}

Re: analogSetAttenuation(ADC_11db); bricked my ESP32-WRover-B

Posted: Tue Jan 21, 2020 10:38 am
by ESP_Sprite
How do you figure that bricked the ESP32? As that call has been used and tested before, it sounds unlikely. Could there be some other thing happening around the same time that was the more likely culprit?