feat: EPWM driver implementation and host unit tests #93
Labels
No labels
Category
App
Category
Documentation
Category
Firmware
Category
Hardware
Category
Qms
PR_Size
L
PR_Size
M
PR_Size
S
PR_Size
XL
PR_Size
XS
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Priority
Very Low Priority
Size
Epic
Size
Feature
Size
Task
Status
Blocked
Status
Draft
Status
Needs-review
Team
Board
Team
Dev
Team
Management
Type
Bug
Type
Capa
Type
Improvement
Type
New-feature
Type
Regulatory
Type
Usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
opendutchsolutions.public/hal_awr6843#93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Description
Adds
hal/mss/epwm/hal_epwm.c/.h— the ePWM (Enhanced Pulse Width Modulator) driver: fixed-frequency, adjustable-duty-cycle waveform generation on the EPWMxA output pin.hal_epwm_init()searches the 8x8 HSPCLKDIV/CLKDIV prescale combination space for a working time-base period, configures Time-Base/Counter-Compare/Action-Qualifier submodules (immediate/non-shadowed mode),hal_epwm_set_duty_cycle()reprograms CMPA, andhal_epwm_start()/hal_epwm_stop()toggle the counter mode. All three ePWM instances supported (register-identical per TRM Section 21.4).Deliberately minimal scope (documented in
hal_epwm.h's top-of-file comment): EPWMxB output, Dead-Band, PWM-Chopper, Trip-Zone, Digital-Compare, Event-Trigger, and multi-module phase sync are all out of scope. Polling-only, no IRQ path — the TRM states the interrupt line is generated entirely by the Event-Trigger submodule, which this driver deliberately doesn't model.Use Case / Rationale
As a firmware developer, I need a
hal_epwm_*API for basic single-output PWM generation, following the same driver pattern established by GPIO, ESM, UART, I2C, SPI, ADCBUF, CBUFF, HWA, and DMM.As a QMS reviewer, I need a host-native Catch2 test suite (
testing/mss/unit/hal_functionality/test_epwm.c) covering the prescale-search math, duty-cycle programming, and start/stop sequencing across all three instances, runnable in CI without target hardware.Acceptance Criteria
hal/mss/epwm/hal_epwm.c/.himplemented against this project's currenthal/registers/component/epwm.h/instance/epwm.htesting/mss/unit/hal_functionality/test_epwm.cpasses underctestFunctional Impact
None — self-contained addition alongside the already-landed GPIO/ESM/UART/I2C/SPI/ADCBUF/CBUFF/HWA/DMM drivers.
Regulatory Impact
None
QMS Impact
None
Risk Impact
No — existing risk coverage sufficient.
Related Issues / PRs
Relates to #4, relates to #75, relates to #77, relates to #79, relates to #81, relates to #83, relates to #85, relates to #87, relates to #89, relates to #91