Skip to content

Commit ed96486

Browse files
author
Konstantin Kondrashov
committed
Merge branch 'fix/lp_wakeup_cause_bits_accumulation' into 'master'
fix(ulp): Fix accumulation of wakeup cause bits in ULP Closes IDFGH-15115 See merge request espressif/esp-idf!38438
2 parents 4bec8b5 + 44983e6 commit ed96486

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

components/ulp/lp_core/lp_core/include/ulp_lp_core_utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ extern "C" {
1818
/**
1919
* @brief Traverse all possible wake-up sources and update the wake-up cause so that
2020
* ulp_lp_core_get_wakeup_cause can obtain the bitmap of the wake-up reasons.
21+
* @note Do not call it from user ULP programs because it will clear the wake-up cause bits
22+
* which were set at ULP startup in lp_core_startup().
2123
*/
2224
void ulp_lp_core_update_wakeup_cause(void);
2325

components/ulp/lp_core/lp_core/lp_core_utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static uint32_t lp_wakeup_cause = 0;
4242

4343
void ulp_lp_core_update_wakeup_cause(void)
4444
{
45+
lp_wakeup_cause = 0;
4546
if ((lp_core_ll_get_wakeup_source() & LP_CORE_LL_WAKEUP_SOURCE_HP_CPU) \
4647
&& (pmu_ll_lp_get_interrupt_raw(&PMU) & PMU_HP_SW_TRIGGER_INT_RAW)) {
4748
lp_wakeup_cause |= LP_CORE_LL_WAKEUP_SOURCE_HP_CPU;

0 commit comments

Comments
 (0)