Browse Source

fix: pm轻休眠唤醒后,应该重新使用外部晶振分频给RTC

Wendal Chen 2 years ago
parent
commit
4d8d29a781
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/port/luat_pm_air101.c

+ 2 - 0
app/port/luat_pm_air101.c

@@ -30,11 +30,13 @@ int luat_pm_dtimer_start(int id, size_t timeout) {
     if (id == 0 && timeout > 0) {
         // 单位秒
         tls_pmu_timer0_start((timeout + 999) / 1000);
+        tls_pmu_clk_select(1);
         return 0;
     }
     else if (id == 1 && timeout > 0) {
         // 单位毫妙
         tls_pmu_timer1_start(timeout);
+        tls_pmu_clk_select(1);
         return 0;
     }
     return -1;