zhoujie 82d672a2d3 📝 docs(openspec): 新增 DVP-DMA-IR 检查的文档和规范
- 在 openspec/changes/archive/ 下新增 2026-03-13-check-dvp-dma-ir 归档目录
- 新增设计文档 (design.md),包含背景、目标、决策和风险评估
- 新增提案文档 (proposal.md),说明变更原因、内容和影响
- 新增功能规范 (spec.md),定义 DVP 配置验证、DMA 内存传输正确性和诊断输出要求
- 新增任务清单 (tasks.md),列出代码审查、中断处理和诊断验证的具体步骤
- 更新 openspec/config.yaml,添加上下文注释
- 在 openspec/specs/ 下新增 dvp-dma-ir-capture 功能规范

🐛 fix(dvp): 修复 DVP 任务中的竞态条件并增强调试输出

- 在 DVP_Task() 中访问 Line_Ready_Flag 和 Ready_Line_Ptr 前禁用 DVP 中断,操作后重新启用,防止数据竞争
- 增强第0行的调试打印,每秒计算并输出帧率 (fps)
- 新增打印第0行前8个字节的原始数据,用于验证数据有效性
- 使用外部定义的 sys_tick_ms 进行时间计算,确保时间基准一致
2026-03-13 23:25:48 +08:00

24 lines
1.1 KiB
Markdown

## Why
The current project utilizes the DVP peripheral along with DMA to acquire infrared image data. It is crucial to verify that this configuration operates normally, correctly buffers the frames without corruption, and properly handles interrupts. Ensuring this functionality is fundamental to any downstream vision processing or data transmission.
## What Changes
- Comprehensive review of the DVP and DMA initialization configuration.
- Verification of memory allocation, frame buffer sizes, and alignment for IR data.
- Validation of the DMA complete/error interrupts and data handling routines.
- If necessary, adding or enabling diagnostic outputs (logs) or tests to confirm data integrity.
## Capabilities
### New Capabilities
- `dvp-dma-ir-capture`: Verifying and ensuring the reliable capture of infrared image data via the CH32V30x DVP peripheral and DMA channels.
### Modified Capabilities
## Impact
- DVP and DMA initialization code (`prj/TCPClient/Debug/dvp.c`, `prj/TCPClient/Debug/dvp.h`).
- Interrupt service routines for DMA/DVP (`prj/TCPClient/User/ch32v30x_it.c`, `prj/TCPClient/User/main.c`).
- System memory and buffering allocations.