Browse Source

add: 当主频低于80M时,执行reboot前恢复到80M.

怀疑2M主频下重启有小概率失败
Wendal Chen 2 years ago
parent
commit
7c8cea3405
1 changed files with 4 additions and 0 deletions
  1. 4 0
      app/port/luat_base_air101.c

+ 4 - 0
app/port/luat_base_air101.c

@@ -282,8 +282,12 @@ const char* luat_os_bsp(void)
 }
 
 #include "wm_watchdog.h"
+#include "luat_mcu.h"
 void luat_os_reboot(int code)
 {
+  if (luat_mcu_get_clk() < 80) {
+    luat_mcu_set_clk(80);
+  }
   tls_sys_set_reboot_reason(REBOOT_REASON_ACTIVE);
   tls_sys_reset();
 }