Merge branch 'feature/esp32c61_light_sleep_support_stage_3' into 'master'

feat(esp_hw_support): esp32c61 sleep support (Stage 3:  support system peripheral sleep retention)

Closes IDF-10384, IDF-10382, and IDF-11004

See merge request espressif/esp-idf!33298
This commit is contained in:
Jiang Jiang Jian
2024-09-21 16:09:36 +08:00
33 changed files with 982 additions and 74 deletions

View File

@@ -71,7 +71,8 @@ void app_main(void)
int64_t t2 = esp_timer_get_time();
ESP_LOGI(TAG, "Woke up from light sleep, time since boot: %lld us", t2);
assert(llabs((t2 - t1) - 500000) < 1200);
// TODO: PM-232
assert(((t2 - t1 - 500000) < 1000) && ((t2 - t1 - 500000) > -2000));
#endif
/* Let the timer run for a little bit more */

View File

@@ -81,7 +81,7 @@ def test_esp_timer(dut: Dut) -> None:
logging.info('Enter sleep: {}, exit sleep: {}, slept: {}'.format(
sleep_enter_time, sleep_exit_time, sleep_time))
assert abs(sleep_time - LIGHT_SLEEP_TIME) < 1200
assert -2000 < sleep_time - LIGHT_SLEEP_TIME < 1000
for i in range(5, 7):
match = dut.expect(PERIODIC_TIMER_REGEX, timeout=2)

View File

@@ -62,5 +62,6 @@ def test_light_sleep(dut: Dut) -> None:
logging.info('Went to sleep again')
match = dut.expect(EXIT_SLEEP_REGEX)
assert match.group(1).decode('utf8') == 'timer' and int(match.group(3)) >= WAKEUP_INTERVAL_MS - 1 and int(match.group(3)) <= WAKEUP_INTERVAL_MS + 1
# TODO: Need to support dynamically change retention overhead for chips which support pmu (PM-232)
assert match.group(1).decode('utf8') == 'timer' and int(match.group(3)) >= WAKEUP_INTERVAL_MS - 2 and int(match.group(3)) <= WAKEUP_INTERVAL_MS + 1
logging.info('Woke up from timer again')

View File

@@ -57,12 +57,22 @@ examples/wifi/itwt:
examples/wifi/power_save:
<<: *wifi_depends_default
disable:
- if: (SOC_WIFI_SUPPORTED != 1)
- if: SOC_WIFI_SUPPORTED != 1
- if: IDF_TARGET in ["esp32c61"]
temporary: true
reason: PM-234
disable_test:
- if: IDF_TARGET == "esp32c61"
temporary: true
reason: lack of runners
depends_components:
- esp_wifi
- esp_phy
- esp_netif
- lwip
- esp_event
- esp_coex
- wpa_supplicant
- esp_driver_uart
examples/wifi/wifi_aware:

View File

@@ -1,5 +1,5 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
# Wifi Power Save Example