feat(ulp): LP Timer interrupt support

This commit adds support for the LP Timer interrupt to be used by the LP
Core.

Merges https://github.com/espressif/esp-idf/pull/15717
This commit is contained in:
jath03
2025-04-08 19:04:41 -07:00
committed by Sudeep Mohanty
parent 53e84d9729
commit a9eba4058e
7 changed files with 52 additions and 1 deletions

View File

@@ -104,6 +104,20 @@ void ulp_lp_core_sw_intr_enable(bool enable);
*/
void ulp_lp_core_sw_intr_clear(void);
#if SOC_LP_TIMER_SUPPORTED
/**
* @brief Enable the LP Timer interrupt
*
*/
void ulp_lp_core_lp_timer_intr_enable(bool enable);
/**
* @brief Clear the interrupt status for the LP Timer interrupt
*
*/
void ulp_lp_core_lp_timer_intr_clear(void);
#endif
/**
* @brief Puts the CPU into a wait state until an interrupt is triggered
*

View File

@@ -191,6 +191,18 @@ void ulp_lp_core_sw_intr_clear(void)
pmu_ll_lp_clear_sw_intr_status(&PMU);
}
#if SOC_LP_TIMER_SUPPORTED
void ulp_lp_core_lp_timer_intr_enable(bool enable)
{
lp_timer_ll_lp_alarm_intr_enable(&LP_TIMER, enable);
}
void ulp_lp_core_lp_timer_intr_clear(void)
{
lp_timer_ll_clear_lp_alarm_intr_status(&LP_TIMER);
}
#endif
void ulp_lp_core_wait_for_intr(void)
{
asm volatile("wfi");