Skip to content

Commit d8de8c6

Browse files
committed
Merge branch 'bugfix/enable_additional_lp_io_wakeup' into 'master'
fix(lp_io): enable setting edge type wakeup sources for targets that support this See merge request espressif/esp-idf!35122
2 parents fc45b4f + c35f188 commit d8de8c6

File tree

11 files changed

+23
-4
lines changed

11 files changed

+23
-4
lines changed

components/esp_driver_gpio/src/rtc_io.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,11 @@ esp_err_t rtc_gpio_isolate(gpio_num_t gpio_num)
254254
esp_err_t rtc_gpio_wakeup_enable(gpio_num_t gpio_num, gpio_int_type_t intr_type)
255255
{
256256
ESP_RETURN_ON_FALSE(rtc_gpio_is_valid_gpio(gpio_num), ESP_ERR_INVALID_ARG, RTCIO_TAG, "RTCIO number error");
257+
#if !SOC_RTCIO_EDGE_WAKE_SUPPORTED
257258
if (intr_type == GPIO_INTR_POSEDGE || intr_type == GPIO_INTR_NEGEDGE || intr_type == GPIO_INTR_ANYEDGE) {
258259
return ESP_ERR_INVALID_ARG; // Dont support this mode.
259260
}
261+
#endif //!SOC_RTCIO_EDGE_WAKE_SUPPORTED
260262
RTCIO_ENTER_CRITICAL();
261263
rtcio_hal_wakeup_enable(rtc_io_number_get(gpio_num), intr_type);
262264
RTCIO_EXIT_CRITICAL();

components/soc/esp32c5/include/soc/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,10 @@ config SOC_RTCIO_WAKE_SUPPORTED
571571
bool
572572
default y
573573

574+
config SOC_RTCIO_EDGE_WAKE_SUPPORTED
575+
bool
576+
default y
577+
574578
config SOC_DEDIC_GPIO_OUT_CHANNELS_NUM
575579
int
576580
default 8

components/soc/esp32c5/include/soc/soc_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@
245245
*/
246246
#define SOC_RTCIO_HOLD_SUPPORTED 1
247247
#define SOC_RTCIO_WAKE_SUPPORTED 1
248+
#define SOC_RTCIO_EDGE_WAKE_SUPPORTED 1
248249

249250
/*-------------------------- Dedicated GPIO CAPS -----------------------------*/
250251
#define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */

components/soc/esp32c6/include/soc/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,10 @@ config SOC_RTCIO_WAKE_SUPPORTED
555555
bool
556556
default y
557557

558+
config SOC_RTCIO_EDGE_WAKE_SUPPORTED
559+
bool
560+
default y
561+
558562
config SOC_DEDIC_GPIO_OUT_CHANNELS_NUM
559563
int
560564
default 8

components/soc/esp32c6/include/soc/soc_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@
230230
*/
231231
#define SOC_RTCIO_HOLD_SUPPORTED 1
232232
#define SOC_RTCIO_WAKE_SUPPORTED 1
233+
#define SOC_RTCIO_EDGE_WAKE_SUPPORTED 1
233234

234235
/*-------------------------- Dedicated GPIO CAPS -----------------------------*/
235236
#define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */

components/soc/esp32c61/include/soc/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@ config SOC_RTCIO_WAKE_SUPPORTED
463463
bool
464464
default y
465465

466+
config SOC_RTCIO_EDGE_WAKE_SUPPORTED
467+
bool
468+
default y
469+
466470
config SOC_DEDIC_GPIO_OUT_CHANNELS_NUM
467471
int
468472
default 8

components/soc/esp32c61/include/soc/soc_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
*/
207207
#define SOC_RTCIO_HOLD_SUPPORTED 1
208208
#define SOC_RTCIO_WAKE_SUPPORTED 1
209+
#define SOC_RTCIO_EDGE_WAKE_SUPPORTED 1
209210

210211
/*-------------------------- Dedicated GPIO CAPS -----------------------------*/
211212
#define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */

components/soc/esp32p4/include/soc/Kconfig.soc_caps.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,10 @@ config SOC_RTCIO_WAKE_SUPPORTED
711711
bool
712712
default y
713713

714+
config SOC_RTCIO_EDGE_WAKE_SUPPORTED
715+
bool
716+
default y
717+
714718
config SOC_DEDIC_GPIO_OUT_CHANNELS_NUM
715719
int
716720
default 8

components/soc/esp32p4/include/soc/soc_caps.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@
275275
*/
276276
#define SOC_RTCIO_HOLD_SUPPORTED 1
277277
#define SOC_RTCIO_WAKE_SUPPORTED 1
278+
#define SOC_RTCIO_EDGE_WAKE_SUPPORTED 1
278279

279280
/*-------------------------- Dedicated GPIO CAPS -----------------------------*/
280281
#define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */

examples/system/ulp/lp_core/gpio_wakeup/main/lp_core_gpio_wake_up_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void wakeup_gpio_init(void)
3434
rtc_gpio_set_direction(WAKEUP_PIN, RTC_GPIO_MODE_INPUT_ONLY);
3535
rtc_gpio_pulldown_dis(WAKEUP_PIN);
3636
rtc_gpio_pullup_en(WAKEUP_PIN);
37-
rtc_gpio_wakeup_enable(WAKEUP_PIN, GPIO_INTR_LOW_LEVEL);
37+
rtc_gpio_wakeup_enable(WAKEUP_PIN, GPIO_INTR_NEGEDGE);
3838
}
3939

4040
void app_main(void)

0 commit comments

Comments
 (0)