esp32: only touch g_ticks_per_us_app in dual core mode

This commit is contained in:
Ivan Grokhotkov 2018-09-19 13:46:59 +08:00
parent 4ff262ecff
commit 0139749ba6

View 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)