From 0139749ba6b3c6cce6c8dba6f011dda5c70af01c Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 19 Sep 2018 13:46:59 +0800 Subject: [PATCH] esp32: only touch g_ticks_per_us_app in dual core mode --- components/esp32/clk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/esp32/clk.c b/components/esp32/clk.c index 54abc18b72..9e30121fc8 100644 --- a/components/esp32/clk.c +++ b/components/esp32/clk.c @@ -61,7 +61,9 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk); // g_ticks_us defined in ROMs for PRO and APP CPU extern uint32_t g_ticks_per_us_pro; +#ifndef CONFIG_FREERTOS_UNICORE extern uint32_t g_ticks_per_us_app; +#endif static const char* TAG = "clk"; @@ -155,7 +157,9 @@ void IRAM_ATTR ets_update_cpu_frequency(uint32_t ticks_per_us) { /* Update scale factors used by ets_delay_us */ g_ticks_per_us_pro = ticks_per_us; +#ifndef CONFIG_FREERTOS_UNICORE g_ticks_per_us_app = ticks_per_us; +#endif } static void select_rtc_slow_clk(slow_clk_sel_t slow_clk)