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:
@@ -177,10 +177,12 @@ static void iot_sensor_ingest(const LUP_SensorReport *sr) {
|
||||
/* lup 传感回调: uart_srv 消费路径的帧从这里喂入 (lup_process_frame 已过校验) */
|
||||
static void iot_evt_sensor_cb(const uint8_t *pkg, uint16_t len) {
|
||||
LUP_SensorReport sr;
|
||||
FAULT_MARKER(MK_EVT_CB_IN);
|
||||
memset(&sr, 0, sizeof(sr));
|
||||
if (lup_parse_sensor_report(pkg, len, &sr) == 0) {
|
||||
iot_sensor_ingest(&sr);
|
||||
}
|
||||
FAULT_MARKER(MK_EVT_CB_OUT);
|
||||
}
|
||||
|
||||
/* 序列化并发布队列头 n 条事件 (首发与重发共用: 同 id/ts 同内容) */
|
||||
|
||||
Reference in New Issue
Block a user