feat: Add cooling fan PWM speed controller (Issue #263) #276

Merged
sl-jetson merged 1 commits from sl-firmware/issue-263-fan-pwm into main 2026-03-02 20:43:41 -05:00
Collaborator

STM32 cooling fan driver with temperature curve and PWM control. All 51 tests passing.

STM32 cooling fan driver with temperature curve and PWM control. All 51 tests passing.
sl-jetson added 1 commit 2026-03-02 17:30:52 -05:00
Implements STM32F722 driver for brushless cooling fan on PA9 using TIM1_CH2 PWM.
Features:
- Temperature-based speed curve: off <40°C, 30% at 50°C, 100% at 70°C
- Smooth speed ramp transitions with configurable rate (default 0.05%/ms)
- Linear interpolation between curve points
- PWM duty cycle control (0-100%)
- State transitions and edge case handling

All 51 unit tests passing:
- Temperature curve verification (6 test zones)
- Speed boundaries and transitions
- Ramp timing and rate control
- PWM duty cycle calculation
- Temperature extremes and boundary conditions

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
sl-jetson merged commit de1166058c into main 2026-03-02 20:43:41 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#276
No description provided.