Files
Stefan Lohmaier a47e0aed3e
Validate / build-test (macos-latest) (push) Failing after 2s
Validate / build-test (windows-latest) (push) Failing after 16s
Validate / build-test (ubuntu-latest) (push) Successful in 18s
Validate / reports (push) Successful in 52s
feat(i18n): tools + landing page + doorstop generator in English
Phase 1 of full English translation:
- generate_doorstop_items.py: all 55 items (SG/SYS/SWE/SA/SWA) rewritten in English
- generate_landing_page.py: full UI labels, KPI cards, section headings in English
- traceability.py: docstring, error messages, HTML headers in English
- generate_test_report.py: report content + table headers in English
- All 55 markdown items in safety/sg/, reqs/, arch/ regenerated in English

Still to come:
- demo-epb filled Word docs (PID, plans, safety, manuals, audit artefacts)
- Code comments + test names + CI workflow step names
- README + dev-process repo templates
2026-05-12 03:28:54 -07:00

60 lines
1.3 KiB
Markdown

---
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
## Responsibility
Low-level control of the two actuator motors. PWM generation,
current measurement, overcurrent cutoff, clamping-force estimation.
Implemented in `src/actuator_driver.c`.
## Static view
```plantuml
@startuml
[Apply Controller] --> [Actuator Driver]
[Actuator Driver] --> [Hardware PWM] : pwm_set
[Actuator Driver] <-- [Hardware ADC] : current_sample
[Actuator Driver] --> [Diagnostic Manager] : DTC
@enduml
```
## Provided interfaces
```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); // Current sampling
```
## Resources
- Stack: <= 256 B
- Worst-case timing: 50 us per ISR
- Static RAM: 64 B per actuator
## Mapping to requirements
| Requirement | How covered |
|-------------|-------------|
| SWE-006 | actuator_release for both actuators in parallel |
| SWE-013 | actuator_isr_1khz |
| SWE-014 | overcurrent detector in ISR |
| SWE-015 | peak-current tracking + linear clamping-force estimate |