feat(dss-rti): DSS RTI driver implementation and host unit tests #114
No reviewers
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!114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/113-dss-rti-driver"
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/dss/rti/hal_dss_rti.c/.h— driver for the two independent DSS-side (C674x) RTI (Real-Time Interrupt) timer instances,DSS_RTIA/DSS_RTIB(TRM Table 4-3's "DSS_RTI (WDT/RTI1)"/"DSS_RTI2", this project's mmwave_sdk-style RTIA/RTIB naming). Neither DSS instance is wired to reset/NMI logic as a watchdog, so this driver — like its scope precedenthal_edma.c— only ever touches counter block 0 / compare channel 0: no watchdog-mode registers, no counter block 1 / compare channels 1-3, no external NTU timebase/capture, no DMA-request wiring.Provides
hal_dss_rti_init(),hal_dss_rti_configure_periodic()(computesRTICPUC0/RTICOMP0/RTIUDCP0frominput_clock_hz/prescale/target_rate_hz),hal_dss_rti_start(),hal_dss_rti_stop(), andhal_dss_rti_clear_interrupt_flag(). The full register bring-up sequence is a 1:1 transcription ofexample/Barebones_DSS/src/dss_tick_timer.c(siblingAWR6xxx_Toolchainrepo), empirically confirmed correct on real AWR6843 silicon — including a documented hardware quirk:RTIUDCP0must be programmed to the same value asRTICOMP0(not left at 0), since leaving it at 0 makes the compare-0 interrupt fire exactly once ever instead of periodically.While implementing, found the driver/test as originally drafted referenced
RTISETINTENA/SETINT0andRTICOMPCTRL.COMPSEL0— this project's currentregisters/component/rti.hfollows TI's CSL naming instead (RTISETINT/RTICLEARINT,RTICOMPCTRL.COMP0SEL, per that header's own documented cross-check against TI'sreg_watchdog.h). Adapted both the driver and its test suite to the current header before landing; caught immediately by a build failure, not silently wrong.Why
Completes the DSS-side driver batch (Mailbox, EDMA, VIM, DSS ADCBUF, DSS INTC, DSS Cache, DSS HWA already landed) with periodic tick-timer bring-up for the DSS core.
Related Issue
Closes #113
Type of Change
Impact Assessment
Testing
testing/dss/rti/test_dss_rtilocally (5 test cases, 63 assertions, all passing) alongside the full existingctestsuite (392/392 passing, no regressions); ran a full MISRA C:2025 pass (0 unsuppressed findings,-DENABLE_DSS_RTI_MODULEadded); reformatted and re-verified against the exact clang-format 18.1.3 the CI runner uses; sanity-checked by changinghal_dss_rti_configure_periodic()'sRTIUDCP0write fromperiodback to0U(undoing the documented hardware-quirk fix), confirming the test suite fails (4 assertions), then reverting.PR Size
Size justification / exemption (if L or XL):
630 raw lines across 6 files, all hand-reviewed (no mechanically-generated content). Not split further — the driver (
hal_dss_rti.c/.h, 405 lines, most of it the.h's doc comments explaining the naming cross-reference and the hardware quirk) and its Catch2 spec (test_dss_rti.c, 220 lines) don't decompose into independently-reviewable sub-PRs, same rationale as every prior driver PR in this project. The remaining files are small CMake/MISRA wiring diffs, also not independently reviewable apart from the driver they enable.Checklist
type(scope): descriptionconvention withRelates to #<issue>footerSummary
hal/dss/rti/hal_dss_rti.c/.h: DSS RTI driver — init/bring-up, periodic-rate configuration, start/stop, interrupt-flag clear, for bothDSS_RTIA/DSS_RTIBinstancestesting/dss/rti/test_dss_rti.c(+CMakeLists.txt): Catch2 functional test suite. No naming collision withti_hal_comparison(that suite's RTI test istest_rti, nottest_dss_rti).testing/CMakeLists.txt:add_subdirectory(dss/rti)andENABLE_DSS_RTI_MODULEin the sharedhw_fakescompile definitionstools/misra/run_misra.sh:-DENABLE_DSS_RTI_MODULEadded