fix sytick drift after tickless wakeup from sleep or stop
1. make port_systick_reload the same as port_systick_config
This commit is contained in:
@@ -24,7 +24,8 @@ __API__ k_err_t tos_pm_cpu_lpwr_mode_set(k_cpu_lpwr_mode_t cpu_lpwr_mode)
|
||||
{
|
||||
TOS_CPU_CPSR_ALLOC();
|
||||
|
||||
if (!tickless_wkup_alarm_is_installed(cpu_lpwr_mode)) {
|
||||
if (cpu_lpwr_mode != TOS_LOW_POWER_MODE_NONE &&
|
||||
!tickless_wkup_alarm_is_installed(cpu_lpwr_mode)) {
|
||||
return K_ERR_PM_WKUP_SOURCE_NOT_INSTALL;
|
||||
}
|
||||
|
||||
|
@@ -143,11 +143,8 @@ __KNL__ void tickless_proc(void)
|
||||
k_cpu_lpwr_mode_t lpwr_mode;
|
||||
|
||||
lpwr_mode = pm_cpu_lpwr_mode_get();
|
||||
if (lpwr_mode == TOS_LOW_POWER_MODE_NONE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!tickless_wkup_alarm_is_installed(lpwr_mode)) {
|
||||
if (lpwr_mode == TOS_LOW_POWER_MODE_NONE ||
|
||||
!tickless_wkup_alarm_is_installed(lpwr_mode)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user