ULP GPIO problems
Posted: Thu Mar 01, 2018 4:29 pm
Here is what I found from trial & error:
- RTC bits 0-9 require the following initialization to be used as inputs from the ULP:
rtc_gpio_init (IO#) - I don't see why this is required because the function description says "This function must be called when initializing a pad for an analog function." We are obviously not using the pin for a digital function, not analog.
rtc_gpio_set_direction (IO#, RTC_GPIO_MODE_INPUT_ONLY) - This makes more sense, but you would think it would already default to input like the other pins.
- RTC bits 10-15 do not require any initialization to be used as inputs from the ULP.
- GPIO0 still has a 2.2K pullup resistor that I don't know how to disable.
So even though I figured out how to read all the pins, the logic to configure them doesn't make sense.
Once of the examples I looked at earlier on was:
https://github.com/espressif/esp-idf/bl ... ple_main.c
Which Contains this comment:
/* Initialize GPIO0 as RTC IO, input, disable pullup and pulldown */
This comment is false, since the pullup resistor cannot be disabled? (and is not disabled when this program is run)
- RTC bits 0-9 require the following initialization to be used as inputs from the ULP:
rtc_gpio_init (IO#) - I don't see why this is required because the function description says "This function must be called when initializing a pad for an analog function." We are obviously not using the pin for a digital function, not analog.
rtc_gpio_set_direction (IO#, RTC_GPIO_MODE_INPUT_ONLY) - This makes more sense, but you would think it would already default to input like the other pins.
- RTC bits 10-15 do not require any initialization to be used as inputs from the ULP.
- GPIO0 still has a 2.2K pullup resistor that I don't know how to disable.
So even though I figured out how to read all the pins, the logic to configure them doesn't make sense.
Once of the examples I looked at earlier on was:
https://github.com/espressif/esp-idf/bl ... ple_main.c
Which Contains this comment:
/* Initialize GPIO0 as RTC IO, input, disable pullup and pulldown */
This comment is false, since the pullup resistor cannot be disabled? (and is not disabled when this program is run)