From 7df75c00c706889ff990191379688f6eb6261ec7 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 20 Feb 2017 15:25:16 +0800 Subject: [PATCH] ulp: fix a bug that ULP may not be restarted correctly --- components/ulp/ulp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/ulp/ulp.c b/components/ulp/ulp.c index 424a468c3c..c7ac15b49c 100644 --- a/components/ulp/ulp.c +++ b/components/ulp/ulp.c @@ -265,6 +265,8 @@ esp_err_t ulp_run(uint32_t entry_point) { // disable ULP timer CLEAR_PERI_REG_MASK(RTC_CNTL_STATE0_REG, RTC_CNTL_ULP_CP_SLP_TIMER_EN); + // wait for at least 1 RTC_SLOW_CLK cycle + ets_delay_us(10); // set entry point SET_PERI_REG_BITS(SENS_SAR_START_FORCE_REG, SENS_PC_INIT_V, entry_point, SENS_PC_INIT_S); // disable force start