Files
ESP32_COMM/main/Kconfig.projbuild
T
小龙虾 661ae54424 feat(ota): 优化 GD32 OTA 流程和 CAN 反馈机制
- 实现 GD32 主动推送 CAN 反馈架构,替代 ESP32 1Hz 轮询方式,
  减少 SPI 总线占用提升带宽效率

- 添加 GD32 Bootloader 就绪检测机制,通过 PB6 硬件信号等待
  保证 OTA 过程稳定可靠

- 集成 CREDIT 感知功能,当 GD32 写 Flash 缓冲时自动等待,
  避免数据包丢失提高传输成功率

- 重构 canFdPollFeedback 为 canFdParseFeedbackPage 函数,
  支持被动解析 GD32 主动推送的数据页

- 更新版本号从 0.37 到 0.3.38 并添加 Kconfig 配置选项支持
2026-07-08 02:51:38 +08:00

43 lines
1.5 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_PACKET_INTERVAL_MS
int "Delay between GD32 OTA packets (ms)"
default 1
range 0 50
help
Idle delay inserted after each successfully acknowledged
firmware packet before sending the next one.
Lower value speeds up OTA, but if GD32 cannot finish
flash write / prepare next ACK in time, set it back.
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. Lower value reduces per-packet
idle time and can significantly speed up OTA, but if GD32
cannot finish flash write before the next poll, increase it.
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