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:
daishengdong
2020-04-28 16:23:57 +08:00
parent efaa24a5c8
commit b13634de77
23 changed files with 22 additions and 262 deletions

View File

@@ -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;
}