fix: IWDG reset during gyro recal — refresh at i=0 not i=39 (P0 #42) #172
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-firmware/gyro-recal-button"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
i%40==39fired the first IWDG refresh only after 40ms of calibration. Combined with ~10ms of main loop overhead before enteringcalibrate(), total elapsed since last refresh could exceed the 50ms IWDG window → watchdog reset.i%40==0— first refresh fires at i=0 (<1ms after entry), subsequent refreshes every 40ms, safely within the 50ms window.src/mpu6000.c(+4/-2)Test plan
Closes #42
🤖 Generated with Claude Code