Skip to content

[TW#14489] i2c errors when using adc2 #869

@jmorsap

Description

@jmorsap

I'm new to esp32/esp-idf and am moving a large embedded project from an atmega328 in the arduino environment to an esp32 wroom32 using esp-idf.

I'm aware that adc2 is not supported and plan on eliminating it in the next design iteration, but I needed the functionality for our current design and so added the ADC2 driver according to ESP32DE's procedure found here #461

The adc2 works fine in its own program, as does I2C.

When I configure the two settings below, the I2C ceases to work and will not work again until a hardware reset.

    adc2_config_width(ADC_WIDTH_12Bit);
    adc2_config_channel_atten(ADC2_TEST_CHANNEL,ADC_ATTEN_11db);

Is there any way to undo these two lines of code or reset these registers after I finish using adc2 so that I can use the I2C again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions