Commit Graph

82 Commits

Author SHA1 Message Date
wuzhenghui
65cc93d7d0 Revert "deep sleep: optimize sleep current in wifi softap mode"
This reverts commit f684bd10f5.
2023-03-30 03:15:45 +00:00
KonstantinKondrashov
ab87a1012f version: Fix missed version checks 2023-03-04 04:48:24 +08:00
KonstantinKondrashov
e88f235326 all: Apply new version logic (major * 100 + minor) 2023-03-02 03:21:34 +00:00
KonstantinKondrashov
3dcdcc08eb efuse: Adds major and minor versions and others 2023-02-11 08:06:49 +00:00
cje
d8fc054115 sleep: fix sleep time inaccurate bug when select 8MD256 as rtc slow clock on ESP32
Related to: https://github.com/espressif/esp-idf/issues/6687
2023-02-10 01:36:40 +08:00
Michael (XIAO Xufeng)
af61c51385 Merge branch 'test/rtc_8m_d256_v4.3' into 'release/v4.3'
rtc: fixed 8MD256 can't be used as RTC slow src on ESP32 (v4.3)

See merge request espressif/esp-idf!18106
2022-11-12 00:45:11 +08:00
Michael (XIAO Xufeng)
7931c033ed 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-11-05 20:02:53 +08:00
Michael (XIAO Xufeng)
b56b459960 rtc: fixed 8MD256 can't be used as RTC slow src on ESP32
Sync configuration from other chips

Closes: https://github.com/espressif/esp-idf/issues/8007, https://github.com/espressif/esp-idf/pull/8089
2022-11-04 12:37:45 +08:00
morris
83dc965b2f Merge branch 'bugfix/fix_rtc8m_calibration_fail_after_cpu_core_reset_v4.3' into 'release/v4.3'
rtc_clk: Fix rtc8m calibration failure after cpu/core reset (backport v4.3)

See merge request espressif/esp-idf!20554
2022-10-18 18:22:01 +08:00
Song Ruo Jing
c0be4cb2ba rtc_clk: Fix rtc8m calibration failure after cpu/core reset
Explicitly guarantee 8md256 clk is enabled before calibration
2022-10-12 12:41:50 +08:00
cje
5e5b8c16cb fix C3 system not stable bug when dbias storing in efuse is bigger than 27 2022-10-08 11:48:47 +08:00
jingli
07d69b7cae esp_hw_support/clk_cali: fix xtal32k error detect 2022-09-21 16:29:36 +08:00
Li Shuai
30b32fa45e esp_hw_support: force power down wifi and bt power domain when rtc module init 2022-07-11 21:15:16 +08:00
KonstantinKondrashov
8d022df00c esp_hw_support: Adds a msg when 32k xtal was stopped 2022-06-09 22:48:53 +08:00
chaijie
908192f504 solve memory error bug when in lightsleep mode 2022-05-16 19:42:56 +08:00
Jiang Jiang Jian
5fe7d538a5 Merge branch 'bugfix/fix_esp32c3_brownout_bug_after_deepsleep_v4.3' into 'release/v4.3'
rtc: fix c3 brownout bug after deepsleep (backport v4.3)

See merge request espressif/esp-idf!17959
2022-05-16 16:10:52 +08:00
chaijie
0d5f7b5521 fix c3 brownout bug after deepsleep 2022-04-28 18:20:25 +08:00
morris
d04a94320a Merge branch 'bugfix/fix_adc_calibration_light_sleep_issue_v4.3' into 'release/v4.3'
adc: fix calibration error when waking up from light sleep (v4.3)

See merge request espressif/esp-idf!16929
2022-04-21 15:56:10 +08:00
Michael (XIAO Xufeng)
75c720bcd3 esp_phy: use spinlock to avoid regi2c access conflicts 2022-04-06 14:46:10 +08:00
Michael (XIAO Xufeng)
92d6c4a502 regi2c: use safe version of spinlock, instead of ISR ver 2022-04-06 12:19:51 +08:00
Armando
fe5a5284ba sleep: restore analog calibration registers after waking up from light sleep
Closes https://github.com/espressif/esp-idf/issues/8287
Closes https://github.com/espressif/esp-idf/issues/7921
2022-03-07 21:58:42 +08:00
Cao Sen Miao
9c4b96d63b USB_SERIAL_JTAG: Fix the issue that there is no rom log when restarting 2022-02-10 10:33:40 +08:00
jingli
4b73610eea reduce bootup time when using usb-serial-jtag 2021-12-03 20:55:52 +08:00
Konstantin Kondrashov
fa85714845 Systimer reset alternative on S2 (and others) (v4.3) 2021-10-28 08:00:28 +00:00
wuzhenghui
7c52647243 fix stuck in rtc_clk_cal 2021-10-21 21:54:04 +08:00
fuzhibo
8ab23d4395 Driver(Touch sensor): fix the touch sensor wait cycle after wakeup from sleep 2021-10-14 17:17:45 +08:00
Li Shuai
4f71b49aa6 esp_hw_support: keep external 40 MHz xtal related analog circuit power on during sleep 2021-09-28 11:21:33 +08:00
Li Shuai
aac59ed5ec Power Management: add XTAL power domain to control whether external 40MHz xtal is powered down during sleep 2021-09-28 11:21:31 +08:00
Li Shuai
4f4254537c esp_hw_support: No voltage drop during light sleep to ensure stable output clock of rtc8m oscillator 2021-09-28 11:20:00 +08:00
Li Shuai
4ef6e37fcb Power Management: add RTC8M power domain to control whether internal 8m oscillator is powered down during sleep 2021-09-28 11:19:57 +08:00
Omar Chebib
173e001680 regi2c: add a spinlock for accessing (reg)I2C devices
When not compiling bootloader, a spinlock will be used for reading or writing
I2C internal devices/registers.
When compiling for bootloader, no need to use any lock.
2021-09-10 18:50:16 +08:00
David Čermák
51f1bc3ced Merge branch 'bugfix/cmake_compiler_warn_write_string_v4.3' into 'release/v4.3'
Build: Fix CMake to pass -Wwrite-string compiler flag if enabled (v4.3)

See merge request espressif/esp-idf!14426
2021-09-09 09:49:33 +00:00
sly
517dd5c5d5 fix_esp32c3_auto_adjust_volt 2021-08-25 21:31:07 +08:00
David Cermak
e7500c711d rtc: Fix minor const char* correction issue 2021-08-18 19:29:44 +08:00
Li Shuai
21b3068b77 deep sleep: clear wakeup and reject int raw signal before entry sleep 2021-06-17 10:41:22 +08:00
Renz Bagaporo
0e904b3f7e ulp: clear rtc int at initialization
Closes https://github.com/espressif/esp-idf/issues/6654
2021-06-01 21:41:12 +08:00
Jiang Jiang Jian
ed76cc4dd4 Merge branch 'feature/support_adjust_voltage_storingInEfuse_open_glitch_rst_v4.3' into 'release/v4.3'
ESP32c3: auto adjust voltage dbias storing in efuse and open glitch reset for ECO3  (backport v4.3)

See merge request espressif/esp-idf!13388
2021-05-13 04:08:56 +00:00
chaijie
6d2bdfc5f5 1. open glitch reset for c3 ECO3;
2. set digital & rtc voltage to about 1.15v which storing in efuse.
2021-05-08 17:38:24 +08:00
Li Shuai
f684bd10f5 deep sleep: optimize sleep current in wifi softap mode 2021-04-29 10:14:30 +08:00
chaijie
e8282fb5c5 esp32s2/esp32s3/esp32c3: Decrease boot up time by delete useless slow clock calibration 2021-04-21 11:38:26 +00:00
Marius Vikhammer
220f3d2198 rtc: increase CI acceptance range for calc 8M test 2021-04-09 15:06:11 +08:00
Renz Bagaporo
ea4a8d5e4f esp_hw_support: fix esp_restart crash
Closes https://github.com/espressif/esp-idf/issues/6836
2021-04-09 09:30:03 +08:00
Renz Bagaporo
dbf2a64adb esp_hw_support: add test for rtc clk compensation 2021-04-07 06:40:28 +08:00
chaijie
0c7f286a87 fix c3 hardware bug before ECO3 and optimizate bbpll config:
1. deepsleep poweron reset bug in high temperature before ECO3;
2. brownout reset bug before ECO2;
3. bbpll voltage low bug before ECO3;
4. need xpd iph for xtal before ECO3;
2021-03-31 20:17:54 +08:00
Xia Xiaotian
b71481093a esp_wifi: fix some Wi-Fi scan and coexist bugs
1. Fix the bug that Wi-Fi performance is impacted by BLE starting scan for a while in some scenarios on ESP32-C3.

2. Fix the bug that Wi-Fi performance is impacted when Bluetooth change state for a while in some scenarios on ESP32-C3.

3. Fix the bug that BLE performance is impacted by Wi-Fi scan on ESP32-C3.

4. Fix the bug that Wi-Fi scan fails when BLE is scanning on ESP32-C3.

5. Fix Wi-Fi ACK and CTS rate when low rate is disabled on ESP32-C3.
2021-02-08 21:20:09 +08:00
Michael (XIAO Xufeng)
d741b08fe7 Merge branch 'feature/esp32c3_deep_sleep_rtcfastmem' into 'master'
esp32c3: Finish deep sleep support

Closes IDF-2560

See merge request espressif/esp-idf!12031
2021-01-26 12:53:34 +08:00
Angus Gratton
0eb8d7e185 esp_hw_support esp32c3: Add deep sleep rtc crc calculation support
Last step to enable deep sleep on ESP32-C3 in all configurations
2021-01-25 17:20:04 +00:00
Michael (XIAO Xufeng)
2b83418141 adc: add fallback calibration method
Also:
1. Separate static configuration into init phase to improve
performance
2. Add a init code config layer to avoid duplicated configuration
3. Add a HW_CALIBRATION_V1 caps
2021-01-25 20:30:42 +08:00
Armando
f5f0461264 tmpsensor: add temp_sensor.h for c3 2021-01-25 04:51:40 +00:00
Angus Gratton
a5fb7deda5 driver: Update/cleanup esp32c3 rtc_tempsensor.c 2021-01-25 04:51:40 +00:00