--- active: true derived: false header: 'Actuator Driver' level: 1.3 normative: true reviewed: null links: - SWE-006 - SWE-013 - SWE-014 - SWE-015 asil: B --- # SWA-003: Actuator Driver ## Verantwortung Low-Level-Ansteuerung der beiden Aktor-Motoren. PWM-Generierung, Strom-Messung, Overcurrent-Cutoff, Klemmkraft-Schaetzung. Implementiert in `src/actuator_driver.c`. ## Statische Sicht ```plantuml @startuml [Apply Controller] --> [Actuator Driver] [Actuator Driver] --> [Hardware PWM] : pwm_set [Actuator Driver] <-- [Hardware ADC] : current_sample [Actuator Driver] --> [Diagnostic Manager] : DTC @enduml ``` ## Schnittstellen (Provided) ```c Status actuator_init(void); void actuator_apply(ActuatorId id, uint8_t pwm_percent); void actuator_release(ActuatorId id, uint8_t pwm_percent); void actuator_stop(ActuatorId id); ActuatorStatus actuator_get_status(ActuatorId id); void actuator_isr_1khz(void); // Strom-Sampling ``` ## Ressourcen - Stack: <= 256 B - Worst-Case Timing: 50 us / ISR - Static RAM: 64 B pro Aktor ## Mapping auf Anforderungen | Anforderung | Wie abgedeckt | |-------------|---------------| | SWE-006 | actuator_release fuer beide Aktoren parallel | | SWE-013 | actuator_isr_1khz | | SWE-014 | Overcurrent-Detektor in ISR | | SWE-015 | Peak-Current-Tracking + lineare Klemmkraft-Schaetzung |