You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found that the documentation and code (ESP-IDF) don't always match 100%. In such cases, I tend to trust the code in the ESP-IDF, as that is what's actually running on devices. Then again, I have seen a case where the code was incorrect (espressif/binutils-esp32ulp#18) and the Technical Manual was actually correct.
In this case, the example follows the approach used by Espressif's own example: https://github.com/espressif/esp-idf/blob/v4.4.1/examples/system/ulp_fsm/ulp/main/ulp_example_main.c#L72, where the rtc_gpio_set_direction function calls rtcio_ll_input_enable (here), which in turn sets the input enable on the RTC_IO_TOUCH_PADx_REG using the RTC_IO_TOUCH_PADx_FUN_IE_M mask (here). That last code uses a lookup table to find the correct register REG for the rtc pin and then the corresponding input-enable IE mask. And since the mask is always 1 bit wide, in our example, we're simply using it as a low-bit number with a bit-width of 1.
(Note, I have also found that with ESP32 low level code, there are often multiple ways of achieving something and the naming used everywhere is not always intuitive or consistent. So it may well be that the other approach you found in the documentation also works. Have you managed to try the other approach with success?)
micropython-esp32-ulp/examples/readgpio.py
Line 40 in 7eb2a80
Can I ask for a clarification on this line of the gpio example? What's got me confused here is that it references bit 13 of this register:
Bit 13 is reserved. I don't know if the intent here really was to write an input enable, like this:
What am I missing?
The text was updated successfully, but these errors were encountered: