From 67734d3b9a0a36f35978f90b363d9f4cbe4fb494 Mon Sep 17 00:00:00 2001 From: wangfq Date: Wed, 12 Aug 2026 14:41:44 +0800 Subject: [PATCH] =?UTF-8?q?debug(vd960DBN):=20clear=5Fble=5Fnotify=5Fbuf?= =?UTF-8?q?=20=E6=8A=93=E7=8E=B0=E8=A1=8C=20=E2=80=94=20buf=E6=8C=87?= =?UTF-8?q?=E9=92=88=20+=20=E8=B0=83=E7=94=A8=E8=80=85=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 沿监控证实: 第二包填充成功 (flag=1 len=49 temp=1) 后被 clear_ble_notify_buf 清空 (flag=0 len=0), 但无 BLE send 打印 = 不是 performPeriodicTask 发送路径 - clear_ble_notify_buf 入口: 有货被清时打印 buf 指针 + __builtin_return_address(0) - 若 buf 指针 != g_notify_buftemp → 指针/内存布局问题; ret 对 .map 定位调用者 --- vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c index 4d655ed..fa73d31 100644 --- a/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c +++ b/vd960DBN/BLE/OnlyUpdateApp_Peripheral/APP/dbn_ble_srv.c @@ -30,6 +30,12 @@ extern uint8_t loop1_FLAG_CUT; void clear_ble_notify_buf(BLE_Notify_Buf * buf) { + if(buf->flag || buf->len) + { + PRINT("CLR_NTF: buf=%08lx flag=%d len=%d ret=%08lx\n", + (unsigned long)buf, buf->flag, buf->len, + (unsigned long)__builtin_return_address(0)); + } buf->len = 0; buf->flag = 0; memset(buf, 0, MAX_BLE_Notify_Buf_LEN);