feat: MSS RTI driver implementation and host unit tests #116
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#116
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/rti/hal_rti.c/.h— driver for the two MSS-side RTI (Real-Time Interrupt) timer instances,MSS_RTIAandMSS_RTIB(TRM Table 4-2).MSS_RTIAis a plain free-running timer;MSS_RTIBis the same Hercules RTI IP block additionally wired as the device's Digital Watchdog Timer (TRM Table 4-3 lists it as "RTI + Digital Watchdog Timer"). Mirrors the already-landed DSS RTI driver's (#113/#114) scope: counter block 0 / compare channel 0 only — no watchdog-mode registers (RTIDWDCTRL/RTIDWDPRLD/RTIWDSTATUS/RTIWDKEY/RTIDWDCNTR/RTIWWDRXNCTRL/RTIWWDSIZECTRL), no counter block 1 / compare channels 1-3, no external NTU timebase/capture, no DMA-request wiring.Unlike the DSS side, MSS interrupts route through the VIM, not a separate DSP-local mechanism — this driver additionally adds a real VIM-dispatched raw handler,
RTI_COMPARE0_IRQHandler()(VIM channel 2,RTI_COMPARE0_IRQn— already defined inhal/registers/awr6843aop.h'sIRQn_Type), which acknowledgesRTIINTFLAG.INT0and forwards to a weak, application-overridablehal_rti_irq_handler()hook, plus a newcaseinhal_vim.c's dispatch switch. This handler is scoped toMSS_RTIAonly —MSS_RTIB's compare-0 interrupt routes through the differently-numberedWDT_REQ0_IRQn(channel 10) instead, per its watchdog wiring, and is out of scope here.Caller-facing safety note to document explicitly in the header: because
MSS_RTIBis the device's live watchdog block, calling this driver's generic counter-block-0 functions (hal_rti_init()/_configure_periodic()/_start()/_stop()) againstHAL_RTI_Bshares hardware with whatever watchdog configuration is (or isn't) active on that instance — this driver does not itself arm, disarm, or otherwise know about the watchdog, so a caller usingHAL_RTI_Bfor general-purpose timing must independently confirm the watchdog isn't concurrently relying on the same registers.Use Case / Rationale
As a firmware developer, I need MSS-side periodic-timer bring-up (matching the DSS RTI driver's shape) with real VIM interrupt dispatch, for application code that needs a periodic tick without hand-rolling RTI register access — this is also a direct prerequisite for the barebones MSS example project currently being scaffolded, which needs a real interrupt source to demonstrate the VIM/ESM dispatch chain.
As a QMS reviewer, I need a host-native Catch2 test suite covering both instances' register programming and the new
RTI_COMPARE0_IRQHandler()'s acknowledge-and-dispatch behavior, runnable in CI without target hardware.Acceptance Criteria
hal/mss/rti/hal_rti.c/.himplemented against this project's currenthal/registers/component/rti.h/instance/rti.htesting/mss/unit/hal_functionality/test_rti.cpasses underctesthal_vim.c's dispatch switch updated with aRTI_COMPARE0_IRQncase, andtest_vim_dispatch/test_vim_functionalstill pass withhal_rti.clinked in (matching the existing dispatch-test pattern every other VIM-routed driver already follows)fake_mss_rtia/fake_mss_rtibregister shims added totesting/support/(theRTIA/RTIBtyped macros currently have no host-test fake backing)Functional Impact
None — self-contained addition; completes MSS/DSS RTI driver parity (DSS side already landed).
Regulatory Impact
None
QMS Impact
None
Risk Impact
The
MSS_RTIB-is-also-the-watchdog caveat above is a genuine, documented risk boundary (not a defect) — this driver deliberately does not touch watchdog-mode registers and calls out the shared-hardware hazard explicitly rather than either silently ignoring it or blockingHAL_RTI_Boutright with no TRM basis to justify that restriction.Related Issues / PRs
Relates to #4, relates to #113