From: Mahavir Jain Date: Mon, 26 Nov 2018 11:02:41 +0000 (+0530) Subject: ulp: add note regarding limitation of ulp_set_wakeup_period in deep sleep mode X-Git-Tag: v3.3-beta1~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=588ecaae09a7323d3ca64c1989e895dfcf693131;p=esp-idf ulp: add note regarding limitation of ulp_set_wakeup_period in deep sleep mode --- diff --git a/components/ulp/include/esp32/ulp.h b/components/ulp/include/esp32/ulp.h index 6960ac97d8..c9ca511017 100644 --- a/components/ulp/include/esp32/ulp.h +++ b/components/ulp/include/esp32/ulp.h @@ -898,6 +898,9 @@ esp_err_t ulp_run(uint32_t entry_point); * i.e. period number 0. ULP program code can use SLEEP instruction to select * which of the SENS_ULP_CP_SLEEP_CYCx_REG should be used for subsequent wakeups. * + * However, please note that SLEEP instruction issued (from ULP program) while the system + * is in deep sleep mode does not have effect, and sleep cycle count 0 is used. + * * @param period_index wakeup period setting number (0 - 4) * @param period_us wakeup period, us * @note The ULP FSM requires two clock cycles to wakeup before being able to run the program. diff --git a/docs/en/api-guides/ulp-cmake.rst b/docs/en/api-guides/ulp-cmake.rst index 6a63f11b46..87ed13aa0a 100644 --- a/docs/en/api-guides/ulp-cmake.rst +++ b/docs/en/api-guides/ulp-cmake.rst @@ -152,7 +152,7 @@ ULP program flow ULP coprocessor is started by a timer. The timer is started once ``ulp_run`` is called. The timer counts a number of RTC_SLOW_CLK ticks (by default, produced by an internal 150kHz RC oscillator). The number of ticks is set using ``SENS_ULP_CP_SLEEP_CYCx_REG`` registers (x = 0..4). When starting the ULP for the first time, ``SENS_ULP_CP_SLEEP_CYC0_REG`` will be used to set the number of timer ticks. Later the ULP program can select another ``SENS_ULP_CP_SLEEP_CYCx_REG`` register using ``sleep`` instruction. -The application can set ULP timer period values (SENS_ULP_CP_SLEEP_CYCx_REG, x = 0..4) using ``ulp_wakeup_period_set`` function. +The application can set ULP timer period values (SENS_ULP_CP_SLEEP_CYCx_REG, x = 0..4) using ``ulp_set_wakeup_period`` function. .. doxygenfunction:: ulp_set_wakeup_period diff --git a/docs/en/api-guides/ulp.rst b/docs/en/api-guides/ulp.rst index a712b8ec02..e59c3cc751 100644 --- a/docs/en/api-guides/ulp.rst +++ b/docs/en/api-guides/ulp.rst @@ -151,7 +151,7 @@ ULP program flow ULP coprocessor is started by a timer. The timer is started once ``ulp_run`` is called. The timer counts a number of RTC_SLOW_CLK ticks (by default, produced by an internal 150kHz RC oscillator). The number of ticks is set using ``SENS_ULP_CP_SLEEP_CYCx_REG`` registers (x = 0..4). When starting the ULP for the first time, ``SENS_ULP_CP_SLEEP_CYC0_REG`` will be used to set the number of timer ticks. Later the ULP program can select another ``SENS_ULP_CP_SLEEP_CYCx_REG`` register using ``sleep`` instruction. -The application can set ULP timer period values (SENS_ULP_CP_SLEEP_CYCx_REG, x = 0..4) using ``ulp_wakeup_period_set`` function. +The application can set ULP timer period values (SENS_ULP_CP_SLEEP_CYCx_REG, x = 0..4) using ``ulp_set_wakeup_period`` function. .. doxygenfunction:: ulp_set_wakeup_period