ESP32-S2 RTC-GPIO hold is not woking after first time.

pavlos77
Posts: 1
Joined: Thu Nov 19, 2020 1:16 pm

ESP32-S2 RTC-GPIO hold is not woking after first time.

Postby pavlos77 » Thu Nov 19, 2020 2:55 pm

Hello, I want to blink a LED , when the ESP is in deep sleep mode ( CPU is off ) from ULP-FSM. I set the appropriate registers ( See below), i can hold the LED ON with no problem and then turn it OFF, but i cannot turn it ON again after the first time.I have read and printed the register and i can see that it set properly.Is is it a bug or i am missing something?

Turn OFF LED
I_WR_REG_BIT(RTC_CNTL_PAD_HOLD_REG, rtc_io_number_get(LED_GPIO), 0)
I_WR_REG_BIT(RTC_GPIO_OUT_W1TC_REG, (uint8_t)(RTC_GPIO_OUT_DATA_W1TC_S + rtc_io_number_get(LED_GPIO)), 1),
I_WR_REG_BIT(RTC_CNTL_PAD_HOLD_REG, rtc_io_number_get(LED_GPIO), 1),
Turn ON LED
I_WR_REG_BIT(RTC_CNTL_PAD_HOLD_REG, rtc_io_number_get(LED_GPIO), 0)
I_WR_REG_BIT(RTC_GPIO_OUT_W1TS_REG, (uint8_t)(RTC_GPIO_OUT_DATA_W1TS_S + rtc_io_number_get(LED_GPIO)), 1),
I_WR_REG_BIT(RTC_CNTL_PAD_HOLD_REG, rtc_io_number_get(LED_GPIO), 1),

Who is online

Users browsing this forum: Baidu [Spider], WiFive and 19 guests