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/components/app/src/uci_tl_task.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/keil/include/components/app/src/uci_tl_task.c b/keil/include/components/app/src/uci_tl_task.c
index 0db4d26..0fc8095 100644
--- a/keil/include/components/app/src/uci_tl_task.c
+++ b/keil/include/components/app/src/uci_tl_task.c
@@ -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.
@@ -87,7 +87,8 @@
 
     if (count < UCI_MAX_UL_ITEMS)
     {
-        struct UCI_TL_MSG_T *p = WsfBufAlloc((uint16_t)(len + sizeof(struct UCI_TL_MSG_T)));
+        uint16_t up_data_len = (uint16_t)(len + sizeof(struct UCI_TL_MSG_T));
+        struct UCI_TL_MSG_T *p = WsfBufAlloc(up_data_len);
 
         if (p != NULL)
         {
@@ -97,8 +98,9 @@
         }
         else
         {
-            LOG_INFO(TRACE_MODULE_UCI, "No buff to up queue\r\n");
+            LOG_INFO(TRACE_MODULE_UCI, "No buff to up queue %u\r\n", up_data_len);
         }
+        // LOG_INFO(TRACE_MODULE_UCI, "HCI %02x %02x %02x %02x\r\n", buf[0], buf[1], buf[2], buf[3]);
     }
     else
     {
@@ -135,6 +137,22 @@
     }
 }
 
+void uci_tl_rx_stop(void)
+{
+    if (uci_tl_dev->uci_tl_rx_stop)
+    {
+        uci_tl_dev->uci_tl_rx_stop();
+    }
+}
+
+void uci_tl_rx_restart(void)
+{
+    if (uci_tl_dev->uci_tl_rx_restart)
+    {
+        uci_tl_dev->uci_tl_rx_restart();
+    }
+}
+
 /*************************************************************************************************/
 /*!
  *  \brief  WSF event handler for UCI transmission layer task.

--
Gitblit v1.9.3