Skip to content

feat: 60 Hz frame-rate support — internal FSIN rate select + frame-budget scaling #78

Description

@boringethan

Summary

Support 60 Hz frame rate (16.7 ms frame period vs 25 ms at 40 Hz). External-FSIN (laser-on) capture already follows whatever rate the console trigger produces; the gaps are:

  1. Internal FSIN (laser-off) is hardcoded 40 Hz — TIM4 PSC=1000/ARR=5999 in MX_TIM4_Init. Add a rate parameter to OW_CAMERA_FSIN (reserved field: 0=off, 1=on@40 for back-compat, 40/60=explicit rate) and reconfigure ARR accordingly.
  2. FSIN debounce is 15 ms (camera_manager.c ~1516) — at 60 Hz the frame spacing is 16.7 ms, leaving <2 ms jitter margin before real frames get swallowed. Reduce to 10 ms (still generous for ringing).
  3. Compression budget guard assumes 25 ms framesCMP_BUDGET_HARD_US 15 ms + copy/send/re-arm does not fit a 16.7 ms frame. Scale hard/warning budgets to be safe at 60 Hz (fallback-to-uncompressed is the safe path).

IMU (TIM14) stays at 40 Hz sampling for now — histograms and IMU stream independently; noted as a possible follow-up.

Part of the cross-repo 60 Hz capture mode (bloodflow-app umbrella issue).

Validation

Bench: 60 Hz external-FSIN scan on both sensors (16 cams), verify ~60 fps arrival, zero SPI overruns / camera-death false positives; laser-off internal-FSIN at 60 Hz.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    60hz Sampling ModeTabled 60 Hz capture mode feature — see bloodflow-app#327 for the resurrection runbookfeatureNew feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions