Commit Graph

111 Commits

Author SHA1 Message Date
wuzhenghui
ead822e6ee
fix(esp_hw_support): fix lightsleep current leakage on usb-phy controlled pad 2023-11-23 10:21:02 +08:00
wuzhenghui
ea8b719288 fix(esp_hw_support): clear all type ULP wakeup intr status at ulp wakeup source enable 2023-11-22 03:06:03 +00:00
Lou Tianhao
0c09543d65 feat(pm): add internal pull-up/downs option for gpio used for deepsleep wakeup 2023-09-20 17:30:18 +08:00
Jiang Jiang Jian
46f5638847 Merge branch 'bugfix/incorrect_time_after_ota_v5.0' into 'release/v5.0'
esp_hw_support: Fix invalid system time if s_esp_rtc_time_us & s_rtc_last_ticks were moved around (v5.0)

See merge request espressif/esp-idf!24410
2023-08-23 16:34:43 +08:00
wuzhenghui
2236c2fd34 fix(lightsleep): suspend cache before goto sleep to avoid cache load wrong data after spi io isolation 2023-07-31 15:35:00 +08:00
Lou Tianhao
3727d56c82 Change: rewrite EXT1 triggle mode all_low to any_low when not esp32 2023-07-25 17:53:33 +08:00
KonstantinKondrashov
031af815da esp_hw_support: Fix invalid system time if s_esp_rtc_time_us & s_rtc_last_ticks were moved around
The commit fixes the case:
If variables in RTC RAM have been moved around by the linker,
they will be filled with garbage data. Any reset other than OTA would work fine
because the variables would still be initialized from the initial bootup.

So now system time will be valid even after OTA.

Closes https://github.com/espressif/esp-idf/issues/9448
2023-07-13 18:30:26 +08:00
Jiang Jiang Jian
c10505f939 Merge branch 'bugfix/fix_esp32s3_psram_access_failed_in_dfs_v5.0' into 'release/v5.0'
esp_pm: fix esp32s3 psram access failed when dfs is enabled (backport v5.0)

See merge request espressif/esp-idf!24199
2023-07-11 12:19:43 +08:00
wuzhenghui
f030c92d05 bugfix: fix adc current leakage by sar_adc on v5.0 2023-06-21 17:43:53 +08:00
wuzhenghui
65e8cb55eb bugfix: fix esp32s3 psram access failed when dfs is enabled 2023-06-15 14:14:21 +08:00
Jiang Jiang Jian
838850abab Merge branch 'feature/example_deep_sleep_wake_stub_backport_v5.0' into 'release/v5.0'
example: add deepsleep_wake stub example (backport v5.0)

See merge request espressif/esp-idf!23414
2023-06-12 11:07:59 +08:00
Jiang Jiang Jian
80ffe63209 Merge branch 'bugfix/close_phy_tsens_before_sleep_v5.0' into 'release/v5.0'
sleep: fix deepsleep current leakage caused by phy_tsens (backport v5.0)

See merge request espressif/esp-idf!23910
2023-06-01 19:55:13 +08:00
wuzhenghui
0ffee5cd2a bugfix: fix wakeup failed if powerdown flash in lightsleep 2023-05-31 19:44:40 +08:00
wuzhenghui
05714f207d bugfix: close phy_tsens before deepsleep 2023-05-25 13:14:52 +08:00
wuzhenghui
4c3b8c13df feature: add wake up time cost info to deep_sleep_wake_stub example 2023-05-04 16:46:15 +08:00
jiangguangming
72676d230a use LL function to get wakeup cause 2023-05-04 16:46:15 +08:00
wuzhenghui
46a1253022 bugfix: fix deepsleep saradc leakage 2023-04-20 11:45:58 +08:00
Li Shuai
d84cdace52 sleep: fix sleep current issue caused by sar adc 2023-04-20 11:45:58 +08:00
liuning
6b5bc6304a rtc_sleep: workaround systimer stall issue during lightsleep on ESP32C3 2023-03-29 21:19:21 +08:00
wanlei
20924e3a72 mspi: turn down freq to fix crash when sleep 2023-03-20 19:46:25 +08:00
Jiang Jiang Jian
dc172b63d3 Merge branch 'bugfix/close_rf_in_deep_sleep_backport_v5.0' into 'release/v5.0'
deep sleep: further optimize sleep current if RF is enabled (backport v5.0)

See merge request espressif/esp-idf!22738
2023-03-20 15:48:29 +08:00
Song Ruo Jing
27f9ee66d5 gpio: Fix IO hold function related problems
1. Fix deep sleep wakeup IOs can not be unhold issue
2. Correct hold related APIs' description
3. Fix gpio_force_hold_all API

docs: Add GPIO wakeup source to sleep_modes doc for ESP32C3 and C2
2023-03-17 14:44:29 +08:00
wuzhenghui
64d5421d8b deep sleep: close rf to optimize sleep current 2023-03-14 13:57:42 +08:00
jingli
833f201610 soc/soc_caps: update soc caps for chips that support power-down of modem hardware 2023-03-13 13:33:18 +08:00
Jiang Jiang Jian
4abb6efb36 Merge branch 'bugfix/fix_gpio_wakeup_related_issues_in_ssc_sleep_test_backport_v5.0' into 'release/v5.0'
sleep: fix gpio wakeup related issues(backport v5.0)

See merge request espressif/esp-idf!22332
2023-02-27 15:12:13 +08:00
Jiang Jiang Jian
809aeb77b7 Merge branch 'bugfix/update_esp_rom_rtc_header_v5.0' into 'release/v5.0'
update esp rom rtc header (backport to v5.0)

See merge request espressif/esp-idf!21915
2023-02-27 15:09:19 +08:00
jingli
e109c5f998 esp32c2: support rtc time feature depend on rtc memory, since c2 does not have rtc memory 2023-02-16 10:52:59 +08:00
jingli
7f15980de9 sleep: fix gpio wakeup not working properly in some cases
Before this fix, when we call esp_pm_configure after gpio_wakeup_enable,
the configuration of GPIO in sleep state in gpio_wakeup_enable will be
overwritten by esp_pm_configure.
2023-02-09 17:32:13 +08:00
jiangguangming
d9efa662c8 esp_hw_support: support riscv call 2023-01-05 15:58:37 +08:00
Zim Kalinowski
759f7ec13d Merge branch 'feature/add_int_task_wdt_esp32c2_v5.0' into 'release/v5.0'
WDT: implement interrupt wdt and task wdt for ESP32-C2 (backport v5.0)

See merge request espressif/esp-idf!20980
2022-12-05 16:38:35 +08:00
jingli
c581b4340a esp_hw_support/sleep: remove redundant spinlock protection for deep sleep 2022-12-02 12:24:52 +00:00
jingli
21c9ec5eee esp_hw_support/sleep: fix current leakage when hold digital io during deep sleep 2022-12-02 12:24:52 +00:00
Omar Chebib
b675bb2a4d WDT: implement interrupt wdt and task wdt for ESP32-C2
ESP32-C2 has a single group timer, thus it will use it for the interrupt watchdog,
which is more critical than the task watchdog. The latter is implement in
software thanks to the `esp_timer`component.
2022-12-01 10:45:35 +00:00
jingli
f91cb280eb esp_hw_support/sleep: fix light sleep wakeup flag
light sleep wakeup flag is true to indicate the most recent successful wakeup from light sleep,
which means the most recent light sleep occurred successfully and then wakes up by wakeup source
2022-10-26 16:11:41 +08:00
jingli
e04c8505e1 esp32/rtc: fix xtal unstable in some cases when sleep
1. add xtal buf wait to fix high temperature restart issue
2. add min sleep value to fix xtal stop due to too short sleep time issue
2022-10-26 16:11:27 +08:00
Michael (XIAO Xufeng)
209545db6a sleep_modes: allow using touch/ULP with RTC_PERIPH domain (including EXT0 wakeup source) 2022-08-25 12:27:59 +08:00
Jiang Jiang Jian
4ba5515dc0 Merge branch 'backport/backport_master_to_release_v5.0' into 'release/v5.0'
backport master to release v5.0(Backport v5.0)

See merge request espressif/esp-idf!19560
2022-08-16 16:37:54 +08:00
Li Shuai
b2a6403b40 Power Management: fix the issue of sleeping time error beacause external 32kHz xtal does not exist 2022-08-15 21:16:02 +08:00
Darian Leung
aa25d83787 esp_hw_support: Fix esp_light_sleep_start() deadlock
esp_light_sleep_start() will stall the other CPU via esp_ipc_isr_stall_other_cpu(). After stalling the other CPU,
will call esp_clk_... API which themselves take locks. If the other stalled CPU is holding those locks, this will
result in a deadlock.

This commit adds a workaround calling esp_clk_private_lock() to take the lock before stalling the other CPU.
2022-08-11 18:38:51 +08:00
jingli
7211b0a89a esp_hw_support/sleep: fix cannot pd cpu and rc fast at the same time during light sleep
Since cpu retention dma use rc fast as clk source, so rc_fast_digi
will be enabled when we config to pd cpu. And cpu retention does not
need rc fast keep on during light sleep. So, if we use rc_fast_digi
to determine whether rc fast can be powered down, then cpu and and
rc fast cannot pd at the same time.
2022-07-28 11:10:58 +08:00
Darian
c8ee369a7c Merge branch 'feature/deprecate-old-cpu-api' into 'master'
HAL: Deprecate old CPU/SoC/Interrupt Controller HAL API

Closes IDF-4919 and IDF-5032

See merge request espressif/esp-idf!18987
2022-07-23 00:37:33 +08:00
morris
741b031e83 soc: added SOC_TOUCH_SENSE_SUPPORTED macro 2022-07-22 00:12:36 +00:00
Guillaume Souchere
6005cc9163 hal: Deprecate interrupt_controller_hal.h, cpu_hal.h and cpu_ll.h interfaces
This commit marks all functions in interrupt_controller_hal.h, cpu_ll.h and cpu_hal.h as deprecated.
Users should use functions from esp_cpu.h instead.
2022-07-22 00:06:06 +08:00
Darian Leung
781d06af73 esp_hw_support: Remove compare_set.h API
This function removes the following legacy atomic CAS functions:

From compare_set.h (file removed):
- compare_and_set_native()
- compare_and_set_extram()

From portmacro.h
- uxPortCompareSet()
- uxPortCompareSetExtram()

Users should call esp_cpu_compare_and_set() instead as this function hides the details
of atomic CAS on internal and external RAM addresses.

Due to the removal of compare_set.h, some missing header includes are also fixed in this commit.
2022-07-22 00:06:06 +08:00
Ivan Grokhotkov
0e53b32d2e
esp_hw_support: perform sleep initialization using ESP_SYSTEM_INIT_FN 2022-07-12 16:58:15 +02:00
Marius Vikhammer
e8b5096f52 ulp-riscv: add support for using ADC as well as an example show-casing it. 2022-07-11 09:31:22 +08:00
Marius Vikhammer
42aa4ee3d4 ulp: only enable relevant wakeup sources for ULP
Do not enable co-processor trap wakeup source when running ULP FSM, as this
could cause spurious wake-ups.
2022-06-24 02:30:29 +00:00
jingli
3a908c66e6 use API instead of Kconfig 2022-06-17 19:57:47 +08:00
jingli
824e0ddca8 improve flash power down logic 2022-06-17 18:01:43 +08:00
Michael (XIAO Xufeng)
7c7d53813c Merge branch 'feat/revert_touch_s3' into 'master'
touch: Added support for using touch in sleep modes back on ESP32-S3

Closes IDF-5041

See merge request espressif/esp-idf!18421
2022-06-15 16:11:50 +08:00