mirror of
https://github.com/ruvnet/RuView.git
synced 2026-04-28 05:59:32 +00:00
fix(firmware): edge_dsp task watchdog starvation on Core 1 (#266)
process_frame() is CPU-intensive (biquad filters, Welford stats, BPM estimation, multi-person vitals) and can run for several ms. At priority 5, edge_dsp starves IDLE1 (priority 0) on Core 1, triggering the task watchdog every 5 seconds. Fix: vTaskDelay(1) after every frame to let IDLE1 reset the watchdog. At 20 Hz CSI rate this adds ~1 ms per frame — negligible for vitals extraction. Verified on real ESP32-S3 with live WiFi CSI: 0 watchdog triggers in 60 seconds (was triggering every 5s before fix). Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
parent
5b2aacd923
commit
024d2583f0
1 changed files with 6 additions and 0 deletions
|
|
@ -787,6 +787,12 @@ static void edge_task(void *arg)
|
|||
while (1) {
|
||||
if (ring_pop(&slot)) {
|
||||
process_frame(&slot);
|
||||
/* Yield after every frame to feed the Core 1 watchdog.
|
||||
* process_frame() is CPU-intensive (biquad filters, Welford stats,
|
||||
* BPM estimation, multi-person vitals) and can take several ms.
|
||||
* Without this yield, edge_dsp at priority 5 starves IDLE1 at
|
||||
* priority 0, triggering the task watchdog. See issue #266. */
|
||||
vTaskDelay(1);
|
||||
} else {
|
||||
/* No frames available — yield briefly. */
|
||||
vTaskDelay(pdMS_TO_TICKS(1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue