test(vd960DBN): 二分卡死点 — 注释 json_sensor_callback enter PRINT + 删冗余打印
现场: LUP 帧后卡死 (5分钟后神秘复位 RST=0x10000000, marker丢失)。 卡死点在 lup_process_frame 内 json_sensor_callback 的 enter PRINT (printf %d 处理), LUP Rx 打印(%s)成功但 enter(%d%d%d)卡死。 实验: - json_sensor_callback enter PRINT #if 0 (坐实 printf 问题) - uart_srv 187-190 重复逐字节打印 #if 0 (LUP Rx 已缓冲打印, 冗余) 验证: 不卡死→printf %d 问题实锤; 仍卡死→json_sensor_callback 后续代码
This commit is contained in:
@@ -874,8 +874,12 @@ static int format_loop_param_json(char *buf, uint16_t buf_size, const LUP_ParamG
|
|||||||
static void json_sensor_callback(const uint8_t *pkg, uint16_t len)
|
static void json_sensor_callback(const uint8_t *pkg, uint16_t len)
|
||||||
{
|
{
|
||||||
FAULT_MARKER(MK_EVT_CB_IN);
|
FAULT_MARKER(MK_EVT_CB_IN);
|
||||||
|
/* 2026-08-13 实验: enter PRINT 是 LUP 帧后卡死嫌疑点 (printf %d 处理死循环),
|
||||||
|
注释验证 — 若卡死消失则坐实 printf 问题, 再深挖 _write/锁 */
|
||||||
|
#if 0
|
||||||
PRINT("JSON: sensor_cb enter socket=%d auth=%d report=%d\n",
|
PRINT("JSON: sensor_cb enter socket=%d auth=%d report=%d\n",
|
||||||
g_json_socket_listen, g_json_auth_state, g_report_cfg.enable);
|
g_json_socket_listen, g_json_auth_state, g_report_cfg.enable);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Check: socket active, authed, report enabled
|
// Check: socket active, authed, report enabled
|
||||||
if (g_json_socket_listen == 0xFF) { PRINT("JSON: sensor_cb skip: no socket\n"); return; }
|
if (g_json_socket_listen == 0xFF) { PRINT("JSON: sensor_cb skip: no socket\n"); return; }
|
||||||
|
|||||||
@@ -183,11 +183,14 @@ void uart_srv(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调试打印
|
// 调试打印 (2026-08-13: LUP Rx 已在 lup_process_frame 缓冲打印,
|
||||||
|
// 此处重复逐字节打印冗余且高频 — 暂时关闭)
|
||||||
|
#if 0
|
||||||
for(i = 0; i < g_pkg_uart_2.offset; i++){
|
for(i = 0; i < g_pkg_uart_2.offset; i++){
|
||||||
PRINT(" %02X", g_pkg_uart_2.pkg[i]);
|
PRINT(" %02X", g_pkg_uart_2.pkg[i]);
|
||||||
}
|
}
|
||||||
PRINT("\n");
|
PRINT("\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user