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)
ULP GPIO problems
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: ULP GPIO problems
Are you sure the board you use doesn't have an external pull-up on GPIO0? 2.2K sounds too low to be an internal pull-up, these are usually tens of KOhms.
Re: ULP GPIO problems
It is the rev 1 version of the DevkitC.
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: ULP GPIO problems
Huh, no pull-up there. Can I ask how you measured the 2.2K?
Re: ULP GPIO problems
I used a 3.3K resistor to pull it down and measured the voltage. The 2.2K was only a rough visual estimate, I did not make a precise measurement or calculation.
Re: ULP GPIO problems
There was some problem with devkitc V1 and the auto reset circuit which could be related?
Who is online
Users browsing this forum: No registered users and 83 guests