[RESOLVED] RTC GPIO handling in STUB fonction

QuentinTrying
Posts: 2
Joined: Sun Nov 20, 2022 3:38 pm

[RESOLVED] RTC GPIO handling in STUB fonction

Postby QuentinTrying » Sun Nov 20, 2022 4:01 pm

Hello,

I want to manipulate (input, output) the RTC PINS of my ESP32C3 in the stub function. But I start to doubt the ability of the esp32c3 to do this....

Indeed, in a functional stub, I have tried the following approaches without success:
Classic functions
Example:

Code: Select all

gpio_set_level()
but the esp leaves the stub and restarts.

RTC pin function
Example:

Code: Select all

rtc_gpio_set_level()
but these cannot be used with esp32c3 as SOC_RTCIO_INPUT_OUTPUT_SUPPORTED is not defined for esp32c3 in the soc_caps.h file.

Register manipulation
Example :

Code: Select all

REG_WRITE(RTC_GPIO_ENABLE_W1TS_REG, BIT(RTC_GPIO_ENABLE_W1TS_S + GPIO_NUM_0))
But I can't find the necessary registers, especially because the file rtc_io_reg.h is only available for the esp32 S series. And the file rtc_cntl_reg.h contains only the registers to be wake up by pin rtc.

Can you confirm that the esp32c3 cannot manipulate the RTC pins but only hold them or get woken up?
Or can you tell me how to do it?


Thanks a lot !
Last edited by QuentinTrying on Sat Dec 10, 2022 3:44 pm, edited 1 time in total.

QuentinTrying
Posts: 2
Joined: Sun Nov 20, 2022 3:38 pm

Re: RTC GPIO handling in STUB fonction

Postby QuentinTrying » Sat Dec 10, 2022 3:43 pm

Finally I found the solution : Using the GPIO function of this file : "esp32c3/rom/gpio.h"

setrin
Posts: 2
Joined: Thu Jan 19, 2023 7:15 pm

Re: [RESOLVED] RTC GPIO handling in STUB fonction

Postby setrin » Thu Jan 19, 2023 7:20 pm

Hello,

I'm having the same issue with my ESP32 C3.
I'm using deep sleep and after which I cannot set INPUT_PULLUP. IT doesn't do anything.

Could you please elaborate on how did you solve the issue?
I'm using Arduino IDE.

Thx in advance

setrin
Posts: 2
Joined: Thu Jan 19, 2023 7:15 pm

Re: [RESOLVED] RTC GPIO handling in STUB fonction

Postby setrin » Sat Jan 21, 2023 3:10 pm

Nevermind, I found the solution.
It was to use

Code: Select all

gpio_pad_unhold
before initializing INPUT_PULLUP pin.
But thanks for giving me hope that it's solvable and to push through.

Who is online

Users browsing this forum: No registered users and 123 guests