fix(vd960DBN): IWDG 无条件启用+喂狗 — 卡死兜底 (卡死定位闭环)
现场: printf 重入修复后乱码消失, 但 LUP 帧处理卡死(连 JSON: sensor_cb enter 都没打印), 且 iot_enable=0 模式 IWDG 未初始化 (iot_mqtt_poll 才喂狗, tcp_json 分支不喂) → 卡死永久冻结无兜底。 修复: - main 无条件 iot_watchdog_init() (IWDG 4s 超时) - 主循环 while 开头无条件 iot_watchdog_kick() (原只在 iot_mqtt_poll) - json_sensor_callback / iot_evt_sensor_cb 加 FAULT_MARKER(MK_EVT_CB_IN/OUT) 效果: 卡死 → 4s IWDG 复位 → 上电 FAULT_DIAG 打印 marker 定位卡死点
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "simple_json.h"
|
||||
#include "storage.h"
|
||||
#include "offlog.h"
|
||||
#include "fault_diag.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -872,6 +873,7 @@ 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)
|
||||
{
|
||||
FAULT_MARKER(MK_EVT_CB_IN);
|
||||
PRINT("JSON: sensor_cb enter socket=%d auth=%d report=%d\n",
|
||||
g_json_socket_listen, g_json_auth_state, g_report_cfg.enable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user