esp-idf/components/esp_hw_support
Michael (XIAO Xufeng) 17b9cc6b4a pm: fixed RTC8M domain power issues
introduced in e44ead5356

1. The int8M power domain config by default is PD. While LEDC is using
RTC8M as clock source, this power domain will be kept on.

But when 8MD256 is used as RTC clock source, the power domain should
also be kept on.

On ESP32, there was protection for it, but broken by commit
e44ead5356. Currently the power domain
will be forced on when LEDC is using RTC8M as clock source &&
!int8m_pd_en (user enable ESP_PDP_DOMAIN_RTC8M in lightsleep). Otherwise
the power domain will be powered off, regardless of RTC clock source.

In other words, int8M domain will be forced off (even when 8MD256
used as RTC clock source) if LEDC not using RTC8M as clock source, user
doesn't enable ESP_PDP_DOMAIN_RTC8M, or in deep sleep.

On later chips, there's no such protection, so 8MD256 could't be used as
RTC clock source in sleep modes.

This commit adds protection of 8MD256 clock to other chips. Fixes the
incorrect protection logic overriding on ESP32. Now the power domain
will be determiend by the logic below (order by priority):

    1. When RTC clock source uses 8MD256, power up
    2. When LEDC uses RTC8M clock source, power up
    3. In deepsleep, power down
    4. Otherwise determined by user config of ESP_PDP_DOMAIN_RTC8M,
       power down by default. (This is preferred to have highest
       priority, but it's kept as is because of current code structure.)

2. Before, after the macro `RTC_SLEEP_CONFIG_DEFAULT` decides dbias, the
protection above may force the int8m PU. This may cause the inconsistent
of dbias and the int8m PU status.

This commit lifts the logic of pd int8m/xtal fpu logic to upper layer
(sleep_modes.c).

Related: https://github.com/espressif/esp-idf/issues/8007, https://github.com/espressif/esp-idf/pull/8089

temp
2022-05-12 15:57:09 +08:00
..
include Merge branch 'feature/support_new_psram_v4.4' into 'release/v4.4' 2022-02-13 14:13:38 +00:00
port pm: fixed RTC8M domain power issues 2022-05-12 15:57:09 +08:00
test ds: update gen_digital_signature_tests.py to handle different max key sizes 2022-02-17 11:24:54 +08:00
clk_ctrl_os.c esp32h2: add rtc clock support 2021-08-26 11:25:39 +08:00
CMakeLists.txt light sleep: separate sleep retention function 2021-08-24 11:54:47 +08:00
compare_set.c esp_hw_support: update copyright notice 2021-08-05 17:38:43 +02:00
component.mk light sleep: separate sleep retention function 2021-08-24 11:54:47 +08:00
cpu_util.c esp_hw_support: update copyright notice 2021-08-05 17:38:43 +02:00
esp_async_memcpy.c build: fix unused tag string 2022-01-28 11:59:45 +08:00
esp_clk.c esp_hw_support: update copyright notice 2021-08-05 17:38:43 +02:00
hw_random.c feat (bootloader): added rng sampling 2022-01-03 16:24:41 +05:30
intr_alloc.c esp_hw_support: update copyright notice 2021-08-05 17:38:43 +02:00
Kconfig USB_SERIAL_JTAG: Fix the issue that there is no rom log when restarting 2022-02-15 18:56:06 +08:00
Kconfig.spiram.common Adjust the variable name & 2021-08-25 16:06:28 +08:00
linker.lf psram: put opiram_psram and spiram_psram in internal ram 2021-10-08 17:39:41 +08:00
mac_addr.c efuse: fix esp32h2 get ext_mac 2021-10-29 19:17:51 +08:00
Makefile.projbuild esp32: move spiram, himem 2021-07-16 20:14:26 +08:00
project_include.cmake esp_hw_support: Clean up CMakeLists file 2021-07-16 20:14:28 +08:00
README.md esp_hw_support: create component 2020-10-28 07:21:29 +08:00
regi2c_ctrl.c esp_phy: use spinlock to avoid regi2c access conflicts 2022-04-06 12:18:23 +08:00
sdkconfig.rename light sleep: add software workaround for esp32s3 gpio reset issue 2021-10-20 11:36:22 +08:00
sleep_gpio.c light sleep: fix Flash leakage when its CS pin has no hardware pullup 2021-09-15 20:34:18 +08:00
sleep_mac_bb.c light sleep: separate sleep wifi/bt mac bb function 2021-08-23 10:25:04 +08:00
sleep_modes.c pm: fixed RTC8M domain power issues 2022-05-12 15:57:09 +08:00
sleep_retention.c light sleep: add i/d-cache tagmem retention support for esp32s3 2021-08-27 11:11:09 +08:00

esp_hw_support

This component contains hardware-related operations for supporting the system. These operations are one level above that of hal in that these(1) use system services such as memory allocation, logging, scheduling or (2) may be multi-step operations involving/affecting multiple parts of the SoC.

Implementations that don't fit other components cleanly, but are not worth creating a new component for (yet) may also be placed here as long as they don't pull dependencies other than the core system components.