From: SnickerSun Date: Sat, 2 Nov 2024 07:14:23 +0000 (+0800) Subject: 1029patch 修复 b核ipc发送失败,特定情况UI滑动卡顿 X-Git-Tag: fd230_release_V1.3.102~137^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1319%2Fhead;p=mirrors%2FFD230.git 1029patch 修复 b核ipc发送失败,特定情况UI滑动卡顿 --- diff --git a/code/sdk/middleware/chips/brandy/pm/service/pm_sleep.c b/code/sdk/middleware/chips/brandy/pm/service/pm_sleep.c index 3c28d5637..5493abbcb 100755 --- a/code/sdk/middleware/chips/brandy/pm/service/pm_sleep.c +++ b/code/sdk/middleware/chips/brandy/pm/service/pm_sleep.c @@ -30,7 +30,7 @@ #define PM_SLEEP_SEL_EVENT 0x777 #define PM_SLEEP_TRACE_DEF_VAL 0x5a5a #define PM_OS_US_TO_MS 1000 - +#define RTC_TIMER_INT_STATUS 0x57024010 enum { PM_SLEEP_STATE_IDLE, PM_SLEEP_STATE_GOTO_DS, @@ -301,7 +301,7 @@ void pm_enter_sleep(uint32_t sleep_ms_val) return; } rtc_times /= PM_OS_US_TO_MS; - if (sleep_ms > rtc_times && rtc_times != 0 && sleep_ms <= g_pm_sleep_threshold) { + if (sleep_ms > rtc_times && rtc_times != 0) { sleep_ms = rtc_times; } if (sleep_ms <= PM_SLEEP_THRESHOLD_WFI_ONLY_MS || pm_get_sleep_veto()) { @@ -318,8 +318,8 @@ void pm_enter_sleep(uint32_t sleep_ms_val) pm_enter_deepsleep_set_flag(); status = pm_os_irq_lock(); - if ((sleep_ms <= g_pm_sleep_threshold) || pm_get_sleep_veto()) { - pm_enter_deepsleep_cancel_flag(); + if ((sleep_ms <= g_pm_sleep_threshold) || pm_get_sleep_veto() || (readw(RTC_TIMER_INT_STATUS) == 1)){ + pm_enter_deepsleep_cancel_flag(); pm_enter_light_sleep(); } else { #if CONFIG_PM_TICKLESS_EN == YES @@ -349,8 +349,6 @@ void pm_set_mcu_dynamic_power_flag(uint8_t flag) void uapi_pm_enter_sleep(void) { - uint32_t status = pm_os_irq_lock(); uint32_t sleep_ms = pm_os_get_sleep_ms(); pm_enter_sleep(sleep_ms); - pm_os_irq_restore(status); }