From e1d888cbcb0b1e7e5bb5a9f7fefb274015363b6d Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Thu, 18 Jun 2026 11:58:40 +0800 Subject: [PATCH] fix(ulp): use RC_FAST approximation for LP core fallback Use the shared SoC RC_FAST approximation when the target has no RTC_FAST source option. Co-authored-by: Cursor --- .../lp_core/shared/include/ulp_lp_core_cpu_freq_shared.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ulp/lp_core/shared/include/ulp_lp_core_cpu_freq_shared.h b/components/ulp/lp_core/shared/include/ulp_lp_core_cpu_freq_shared.h index b690a9186a1..5a7550af024 100644 --- a/components/ulp/lp_core/shared/include/ulp_lp_core_cpu_freq_shared.h +++ b/components/ulp/lp_core/shared/include/ulp_lp_core_cpu_freq_shared.h @@ -25,9 +25,9 @@ #define LP_CORE_CYCLES_PER_US_DENOM 1U #endif #else // Default value in chip without rtc fast clock sel option -#define LP_CORE_CPU_FREQUENCY_HZ 16000000U -#define LP_CORE_CYCLES_PER_US_NUM 16U -#define LP_CORE_CYCLES_PER_US_DENOM 1U +#define LP_CORE_CPU_FREQUENCY_HZ SOC_CLK_RC_FAST_FREQ_APPROX +#define LP_CORE_CYCLES_PER_US_NUM (SOC_CLK_RC_FAST_FREQ_APPROX / 500000U) +#define LP_CORE_CYCLES_PER_US_DENOM 2U #endif /**