From d61ff830aa0e6764337cefea0465fb14376928b5 Mon Sep 17 00:00:00 2001 From: wangfq Date: Thu, 16 Jul 2026 14:52:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(vd960DBN):=20BUFF=5FSTACK=5FSIZE=20512?= =?UTF-8?q?=E2=86=9264=20=E5=AF=B9=E9=BD=90=20Loop=20=E4=BE=A7=E4=B8=B2?= =?UTF-8?q?=E5=8F=A3=E5=B8=A7=E7=BC=93=E5=86=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 串口帧缓冲装的是 Loop↔DBN 的 0x7F 私有协议帧, 与 Loop 侧发送缓冲(64)同源 - 当前最大帧 0x0C 多线圈上报实测 56B (Len=51), 64 留 8B 余量, 512 严重浪费 - g_pkg_uart_1/2 各省 448B, 合计回收 ~896B SRAM - 顺带删除零引用死结构体 USART_DMA_UNIT + RX_BUFFER_LEN 宏 --- .../BLE/OnlyUpdateApp_Peripheral/APP/include/cmcng.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/cmcng.h b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/cmcng.h index d14c76b..65bf887 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/cmcng.h +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/include/cmcng.h @@ -19,7 +19,7 @@ #define HARDWARE_VER_SUB 1 -#define BUFF_STACK_SIZE 512 //128 +#define BUFF_STACK_SIZE 64 #define MAX_UART_TXRX_LEN 32 @@ -91,15 +91,6 @@ extern Pkg_Uart g_pkg_uart_1; extern Pkg_Uart g_pkg_uart_2; -#define RX_BUFFER_LEN BUFF_STACK_SIZE - -typedef struct -{ - volatile uint8_t DMA_USE_BUFFER; - uint8_t Rx_Buffer[2][RX_BUFFER_LEN]; - -} USART_DMA_UNIT; - typedef struct _DBN_BLE_STATE_