]> granicus.if.org Git - esp-idf/commitdiff
esp32: only touch g_ticks_per_us_app in dual core mode
authorIvan Grokhotkov <ivan@espressif.com>
Wed, 19 Sep 2018 05:46:59 +0000 (13:46 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 25 Sep 2018 07:13:47 +0000 (15:13 +0800)
components/esp32/clk.c

index 54abc18b72dad8d1cd20f1adf401a33cd5b0d885..9e30121fc8e96fffef7c31906aa68766c577b804 100644 (file)
@@ -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)