Browse Source

fix: 实现tick64后, 轻休眠的功耗异常了, 1ma变成5ma, 修正之

Wendal Chen 3 years ago
parent
commit
885f49aed9
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/port/luat_pm_air101.c

+ 5 - 0
app/port/luat_pm_air101.c

@@ -3,13 +3,18 @@
 
 #include "wm_pmu.h"
 #include "wm_regs.h"
+#include "wm_timer.h"
 
 #define LUAT_LOG_TAG "pm"
 #include "luat_log.h"
 
+extern u8 u64_tick_timer_id;
+
 int luat_pm_request(int mode) {
     if (mode == LUAT_PM_SLEEP_MODE_LIGHT) {
+        tls_timer_stop(u64_tick_timer_id);
         tls_pmu_sleep_start();
+        tls_timer_start(u64_tick_timer_id);
         return 0;
     }
     else if (mode == LUAT_PM_SLEEP_MODE_DEEP || mode == LUAT_PM_SLEEP_MODE_STANDBY) {