From f5154b82e3d3534aa617eb83414ee52254962323 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 4 Sep 2020 15:15:41 +0800 Subject: [PATCH 1/4] newlib: init microseconds offset --- components/newlib/port/esp_time_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/newlib/port/esp_time_impl.c b/components/newlib/port/esp_time_impl.c index 63586257d5..0f312b71d6 100644 --- a/components/newlib/port/esp_time_impl.c +++ b/components/newlib/port/esp_time_impl.c @@ -50,7 +50,7 @@ // Offset between FRC timer and the RTC. // Initialized after reset or light sleep. #if defined(CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER) && defined(CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER) -uint64_t s_microseconds_offset; +uint64_t s_microseconds_offset = 0; #endif #ifndef CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER From 2dc7b556f3569f63e37622ea5985b30bcac4b510 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Thu, 21 Jan 2021 16:23:52 +0800 Subject: [PATCH 2/4] esp32s2: reset systimer clk on startup --- components/esp_system/port/soc/esp32s2/clk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/esp_system/port/soc/esp32s2/clk.c b/components/esp_system/port/soc/esp32s2/clk.c index 2a29d51ab1..688e0ec076 100644 --- a/components/esp_system/port/soc/esp32s2/clk.c +++ b/components/esp_system/port/soc/esp32s2/clk.c @@ -35,6 +35,7 @@ #include "driver/periph_ctrl.h" #include "bootloader_clock.h" #include "soc/syscon_reg.h" +#include "hal/clk_gate_ll.h" static const char *TAG = "clk"; @@ -313,6 +314,8 @@ __attribute__((weak)) void esp_perip_clk_init(void) DPORT_CLEAR_PERI_REG_MASK(DPORT_BT_LPCK_DIV_FRAC_REG, DPORT_LPCLK_SEL_8M); DPORT_SET_PERI_REG_MASK(DPORT_BT_LPCK_DIV_FRAC_REG, DPORT_LPCLK_SEL_RTC_SLOW); + periph_ll_reset(PERIPH_SYSTIMER_MODULE); + /* Enable RNG clock. */ periph_module_enable(PERIPH_RNG_MODULE); } From 59f7242de15630f0d60e98323db591f18c9d341a Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 4 Sep 2020 08:46:23 +0800 Subject: [PATCH 3/4] ci: revert disable esp32s2 timer test --- components/esp_system/test/test_sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_system/test/test_sleep.c b/components/esp_system/test/test_sleep.c index 18ae86d897..1dabef1a43 100644 --- a/components/esp_system/test/test_sleep.c +++ b/components/esp_system/test/test_sleep.c @@ -69,6 +69,7 @@ TEST_CASE("light sleep followed by deep sleep", "[deepsleep][reset=DEEPSLEEP_RES esp_light_sleep_start(); esp_deep_sleep_start(); } +#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3) TEST_CASE("wake up from light sleep using timer", "[deepsleep]") { @@ -81,7 +82,6 @@ TEST_CASE("wake up from light sleep using timer", "[deepsleep]") (tv_stop.tv_usec - tv_start.tv_usec) * 1e-3f; TEST_ASSERT_INT32_WITHIN(500, 2000, (int) dt); } -#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3) static void test_light_sleep(void* arg) { From 65a02d1552ee9facef923a11bb596633cefc37f8 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 22 Jan 2021 14:54:08 +0800 Subject: [PATCH 4/4] ci: increase job count for esp32s2 --- tools/ci/config/target-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci/config/target-test.yml b/tools/ci/config/target-test.yml index 0e9a4919d4..16d2faf551 100644 --- a/tools/ci/config/target-test.yml +++ b/tools/ci/config/target-test.yml @@ -508,7 +508,7 @@ UT_034: UT_035: extends: .unit_test_s2_template - parallel: 49 + parallel: 50 tags: - ESP32S2_IDF - UT_T1_1