diff --git a/utilities/at32f421_freertos_demo/src/TaskLoop.c b/utilities/at32f421_freertos_demo/src/TaskLoop.c index 62cb569..7a977e5 100644 --- a/utilities/at32f421_freertos_demo/src/TaskLoop.c +++ b/utilities/at32f421_freertos_demo/src/TaskLoop.c @@ -665,7 +665,9 @@ void vd1_task(void) } /* 1b. 快速 IIR — α=0.5: (old + new) / 2 */ - if (loop1_CAPVD_fast != 0) { + if (loop1_CAPVD_fast == 0) { + loop1_CAPVD_fast = loop1_CAPVD; // 首次直接锁定 + } else { loop1_CAPVD_fast = (loop1_CAPVD_fast + loop1_CAPVD) / 2; }