Files
ESP32_COMM/main/Kconfig.projbuild
T
小龙虾 51c89b3065 feat(ota): 实现GD32 OTA包间背压机制,优化传输节奏控制
移除固定的包间延迟配置 `OTA_PACKET_DELAY_MS`,采用基于SPI Link v2
CREDIT背压的动态节奏控制,在SpiMaster中通过remoteCredit==0时wait/拒发
实现流量控制,提高OTA传输稳定性。

refactor(stack): 统一任务栈大小配置并添加CPU统计功能

- 在app_config.h中集中定义所有任务栈大小常量,基于实测水位优化分配
- 新增monitor/cpu_stats.cpp组件,提供1Hz FreeRTOS CPU占用采样
- 更新main.cpp中的任务创建使用新的栈大小常量
- 调整health_monitor和ota_relay等任务的栈分配

perf(ota): 改进ESP32和GD32 OTA分区预擦策略

- ESP32 OTA从边写边擦改为整分区预擦模式,避免写入时的扇区擦除阻塞
- GD32 OTA在prepare阶段进行整分区预擦,提升后续写入吞吐量
- 优化OTA协调器状态管理,修复FINALIZING状态残留问题

fix(log): 改进UDP日志发送的堆内存管理

- 当堆内存不足时记录UDP发送跳过的告警信息到ring buffer
- 降低UDP发送跳过的内存阈值从10KB到6KB
- 降低日志排水最小内存阈值从8KB到4KB

docs(readme): 更新OTA配置参数文档说明

移除已废弃的OTA_PACKET_DELAY_MS参数,更新包间节奏控制说明为
基于CREDIT背压机制的描述。
2026-07-16 01:24:12 +08:00

35 lines
1.2 KiB
Plaintext

menu "DCU OTA Configuration"
config DCU_SPI_CLOCK_HZ
int "SPI clock frequency for GD32 (Hz)"
default 4000000
range 1000000 20000000
help
SPI clock speed between ESP32-C3 and GD32E50x.
Higher value speeds up GD32 OTA relay, but must be
validated against actual wiring length/quality and GD32
SPI slave timing.
config DCU_OTA_POLL_BACKOFF_MS
int "Polling backoff when GD32 is not ready (ms)"
default 2
range 0 50
help
Delay between SPI response polls when GD32 returns WAIT
or does not drive MISO yet. Packet pacing uses SPI Link v2
CREDIT backpressure in SpiMaster (remoteCredit==0 → wait/
refuse TX), not a fixed inter-packet delay. Lower value
reduces poll idle time; increase if GD32 needs more time
between polls.
config DCU_OTA_FINISH_TIMEOUT_MS
int "Timeout for FINISH_OTA command (ms)"
default 10000
range 3000 60000
help
How long ESP32 waits for GD32 to respond to the FINISH_OTA
command. GD32 may need extra time to drain flash buffers,
verify firmware, or prepare the APP jump.
endmenu