feat(lp_timer): add soc caps that lp timer and brownout share intr source

This commit is contained in:
gaoxu
2024-12-20 17:31:31 +08:00
parent b240defc75
commit 8b2470a4ab
11 changed files with 26 additions and 2 deletions

View File

@@ -87,8 +87,7 @@ void esp_brownout_init(void)
brownout_hal_config(&cfg);
brownout_ll_intr_clear();
// TODO: [ESP32H21] IDF-11530
#if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C61 || CONFIG_IDF_TARGET_ESP32H21
#if SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
// TODO IDF-6606: LP_RTC_TIMER interrupt source is shared by lp_timer and brownout detector, but lp_timer interrupt
// is not used now. An interrupt allocator is needed when lp_timer intr gets supported.
esp_intr_alloc_intrstatus(ETS_LP_RTC_TIMER_INTR_SOURCE, ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED, (uint32_t)brownout_ll_intr_get_status_reg(), BROWNOUT_DETECTOR_LL_INTERRUPT_MASK, &rtc_brownout_isr_handler, NULL, NULL);

View File

@@ -1199,6 +1199,10 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
int
default 16
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
bool
default y
config SOC_TIMER_GROUPS
int
default 2

View File

@@ -482,6 +482,7 @@
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
#define SOC_TIMER_GROUPS (2)

View File

@@ -1151,6 +1151,10 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
int
default 16
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
bool
default y
config SOC_TIMER_GROUPS
int
default 2

View File

@@ -449,6 +449,7 @@
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
#define SOC_TIMER_GROUPS (2)

View File

@@ -859,6 +859,10 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
int
default 16
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
bool
default y
config SOC_TIMER_GROUPS
int
default 2

View File

@@ -360,6 +360,7 @@
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
#define SOC_TIMER_GROUPS (2)

View File

@@ -1155,6 +1155,10 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
int
default 16
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
bool
default y
config SOC_TIMER_GROUPS
int
default 2

View File

@@ -447,6 +447,7 @@
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
#define SOC_TIMER_GROUPS (2)

View File

@@ -463,6 +463,10 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
int
default 16
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
bool
default y
config SOC_TIMER_GROUPS
int
default 2

View File

@@ -429,6 +429,7 @@
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
#define SOC_TIMER_GROUPS (2)