Skip to content

Commit

Permalink
hal/gpio_ll: fix digital gpio can not enable hold during deep sleep w…
Browse files Browse the repository at this point in the history
…hen force_unhold set(32/s2/s3)
  • Loading branch information
jingli authored and espressif-bot committed Dec 2, 2022
1 parent 4223427 commit 99c8c0c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/hal/esp32/include/hal/gpio_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ static inline void gpio_ll_get_drive_capability(gpio_dev_t *hw, uint32_t gpio_nu
*/
static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw)
{
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M);
}

Expand Down
1 change: 1 addition & 0 deletions components/hal/esp32s2/include/hal/gpio_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ static inline void gpio_ll_get_drive_capability(gpio_dev_t *hw, uint32_t gpio_nu
*/
static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw)
{
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M);
}

Expand Down
1 change: 1 addition & 0 deletions components/hal/esp32s3/include/hal/gpio_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ static inline void gpio_ll_get_drive_capability(gpio_dev_t *hw, uint32_t gpio_nu
*/
static inline void gpio_ll_deep_sleep_hold_en(gpio_dev_t *hw)
{
CLEAR_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_FORCE_UNHOLD);
SET_PERI_REG_MASK(RTC_CNTL_DIG_ISO_REG, RTC_CNTL_DG_PAD_AUTOHOLD_EN_M);
}

Expand Down

0 comments on commit 99c8c0c

Please sign in to comment.