From 23480ab197150979f4505501a1abe8a64796fb18 Mon Sep 17 00:00:00 2001
From: chen <15335560115@163.com>
Date: 星期五, 04 七月 2025 18:37:07 +0800
Subject: [PATCH] 初步调好发包,解决因为uwb未open导致txlen不断溢出重启问题,两边sts配置初步调好

---
 keil/include/drivers/mk_rtc.h |   36 ++++++++++++++++++++----------------
 1 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/keil/include/drivers/mk_rtc.h b/keil/include/drivers/mk_rtc.h
index d6753bc..6bc2e88 100644
--- a/keil/include/drivers/mk_rtc.h
+++ b/keil/include/drivers/mk_rtc.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019-2023 Beijing Hanwei Innovation Technology Ltd. Co. and
+ * Copyright (c) 2019-2025 Beijing Hanwei Innovation Technology Ltd. Co. and
  * its subsidiaries and affiliates (collectly called MKSEMI).
  *
  * All rights reserved.
@@ -48,7 +48,7 @@
  */
 
 #ifndef RTC_FREE_COUNTER_EN
-#define RTC_FREE_COUNTER_EN (0)
+#define RTC_FREE_COUNTER_EN (1)
 #endif
 
 #if RTC_FREE_COUNTER_EN
@@ -72,11 +72,15 @@
 extern "C" {
 #endif
 
-int rtc_open(enum RTC_DEV_T id);
+uint32_t rtc_ms(void);
+uint32_t rtc_us(void);
+
+int rtc_open(enum RTC_DEV_T id, uint8_t rst_en);
 int rtc_close(enum RTC_DEV_T id);
 
 uint32_t rtc_get(enum RTC_DEV_T id);
 
+int rtc_set_alarm_lite(enum RTC_DEV_T id, uint32_t target);
 int rtc_set_alarm(enum RTC_DEV_T id, uint32_t target, drv_callback_t callback);
 void rtc_clear_alarm(enum RTC_DEV_T id);
 void RTC_ALARM_IRQHandler(void);
@@ -120,7 +124,7 @@
 extern "C" {
 #endif
 
-int rtc_open(enum RTC_DEV_T id, drv_callback_t callback);
+int rtc_open(enum RTC_DEV_T id, uint8_t rst_en, drv_callback_t callback);
 int rtc_close(enum RTC_DEV_T id);
 
 int rtc_set(enum RTC_DEV_T id, struct RTC_TIME_T *time);
@@ -137,21 +141,21 @@
 #endif
 #endif
 
-/* RCO 32K clock measure time */
-enum RCO32_MEAS_TIME_T
+/* CLK 32K measurement time */
+enum CLK32K_MEAS_TIME_T
 {
-    RCO32K_MEAS_TIME_8_CYCLES = 0,
-    RCO32K_MEAS_TIME_16_CYCLES,
-    RCO32K_MEAS_TIME_32_CYCLES, // ~1ms
-    RCO32K_MEAS_TIME_64_CYCLES,
-    RCO32K_MEAS_TIME_128_CYCLES,
-    RCO32K_MEAS_TIME_256_CYCLES,
-    RCO32K_MEAS_TIME_512_CYCLES,
-    RCO32K_MEAS_TIME_1024_CYCLES,
+    CLK32K_MEAS_TIME_8_CYCLES = 0,
+    CLK32K_MEAS_TIME_16_CYCLES,
+    CLK32K_MEAS_TIME_32_CYCLES, // ~1ms
+    CLK32K_MEAS_TIME_64_CYCLES,
+    CLK32K_MEAS_TIME_128_CYCLES,
+    CLK32K_MEAS_TIME_256_CYCLES,
+    CLK32K_MEAS_TIME_512_CYCLES,
+    CLK32K_MEAS_TIME_1024_CYCLES,
 };
 
-void rco32k_clk_calibrate(enum RCO32_MEAS_TIME_T time);
-void RCO32K_CAL_IRQHandler(void);
+void clk32k_ppm_calibrate(enum CLK32K_MEAS_TIME_T time);
+void CLK32K_CAL_IRQHandler(void);
 
 /**
  * @}

--
Gitblit v1.9.3