From: caisking Date: Thu, 30 Apr 2026 08:44:52 +0000 (+0800) Subject: 关机时间进行校准 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=16e05ea747bd2522f333af20d6f5ef46b315c1a0;p=mirrors%2FFD230.git 关机时间进行校准 --- diff --git a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c index bc234f7be..61d07d89d 100644 --- a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c +++ b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c @@ -525,8 +525,13 @@ static void thread_main(const void *unused) ConfigModelInit(); // uapi_runtime_log_service_init(); init_btaddr_btname(); + + // 退出低功耗后的关键恢复流程,临时加投票避免再次睡眠打断恢复。 + // (void)uapi_pm_add_sleep_veto(PM_ID_SYS); uapi_calendar_init(); uapi_calendar_recover_date(); + // (void)uapi_pm_remove_sleep_veto(PM_ID_SYS); + // #endif #if DSP_EXIST == YES audio_init(); diff --git a/code/sdk/bootloader/flashboot/brandy/boot_ulp/boot_ulp.h b/code/sdk/bootloader/flashboot/brandy/boot_ulp/boot_ulp.h index dbc05f701..99111b093 100644 --- a/code/sdk/bootloader/flashboot/brandy/boot_ulp/boot_ulp.h +++ b/code/sdk/bootloader/flashboot/brandy/boot_ulp/boot_ulp.h @@ -37,7 +37,7 @@ extern "C" { #define ULP_SYSTICK_SET2 0x5702c52C #define ULP_SYSTICK_SET3 0x5702c530 #define MS_PER_S 1000 -#define ULP_CALIBRATION_INTERVAL 900000 +#define ULP_CALIBRATION_INTERVAL 900000UL // 15 minutes (ms) #define SSB_CALENDAR_BASE_ADDR 0x57038000 /** diff --git a/code/sdk/drivers/chips/brandy/porting/calendar/calendar_porting.c b/code/sdk/drivers/chips/brandy/porting/calendar/calendar_porting.c index 6a611e8b6..fc8ef8d0d 100644 --- a/code/sdk/drivers/chips/brandy/porting/calendar/calendar_porting.c +++ b/code/sdk/drivers/chips/brandy/porting/calendar/calendar_porting.c @@ -14,7 +14,7 @@ #include "memory_config.h" #include "calendar_porting.h" -#define ULP_CALIBRATION_INTERVAL 900000 +#define ULP_CALIBRATION_INTERVAL 900000UL // 15 minutes (ms) #define VERIFICATIN_TIME 0xFFFFFFFFFFFFFFFFUL #define SELFHEAL_TIME 500UL #define CALENDAR_BASE_ADDR ULP_RAM_CALENDAR