feat(pinmux): MSS IOMUX/pinmux driver implementation and host unit tests #119
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!119
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/118-mss-pinmux-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/mss/pinmux/hal_pinmux.c/.hforMSS_IOMUX(base address0xFFFFEA00) — a genuinely missing layer this HAL had no coverage for at all: every pin on this device is individually muxed via a 49-entryPADxx_CFG_REGarray behind a kick-register write-protect mechanism (IOCFGKICK0/IOCFGKICK1), and neitherhal_gpio.cnor any peripheral driver in this HAL touches it. Confirmed missing the hard way: a downstream barebones MSS example found that neither GPIO output nor UART TX/RX reached their physical pads on real AWR6843 hardware, because nothing in this HAL ever routed them there.Register layout cross-checked against two independent sources that agree exactly:
mmwave_sdk_03_06_02_00-LTS/packages/ti/drivers/pinmux/include/reg_pinmux.h.The
IOCFGKICK0/IOCFGKICK1unlock/lock magic values have no register-level documentation in either source (both explicitly note they were recovered from TI's own mmWave SDK by observation) — carried forward as-is, flagged as such in the driver's own comments rather than silently treated as fully verified.Also removes the stale
MSS_IOMUX_BASE_ADDRESSplaceholder fromawr6843aop.h(left over from the original register-description epic, "no typed peripheral pointer exists until a component header is written") — now superseded by a real component/instance header pair, which independently confirms the exact same base address that placeholder already had.Why
Fixes a real, confirmed-on-hardware gap blocking a downstream barebones MSS example: without pinmux, no other driver in this HAL can actually reach its physical pins.
Related Issue
Closes #118
Type of Change
Impact Assessment
IOCFGKICK0/IOCFGKICK1magic values are a genuine, carried-forward risk note (not derived from a register field description this project has direct access to) — flagged explicitly rather than silently treated as fully verified.Testing
testing/mss/unit/hal_functionality/test_pinmuxlocally (5 test cases, 19 assertions, all passing) alongside the full existingctestsuite (403/403 passing, no regressions); ran a full MISRA C:2025 pass (0 unsuppressed findings,-DENABLE_PINMUX_MODULEadded); reformatted and re-verified against the exact clang-format 18.1.3 the CI runner uses. Sanity-checked by changing the pad-index bounds check from>=to>(off-by-one, allowing an out-of-range write), confirming the test suite fails (1 assertion), then reverting.PR Size
Size justification / exemption (if L or XL):
464 raw lines across 15 files, all hand-reviewed (no mechanically-generated content). The register description (
iomux.hcomponent/instance, 198 lines) and the driver+test (hal_pinmux.c/.h+test_pinmux.c, 233 lines) don't decompose into independently-reviewable sub-PRs — this project's established pattern lands a register description alongside its first consuming driver when the peripheral is small and focused, same as several earlier DSS drivers this session. The remaining files are small CMake/Kconfig/MISRA wiring diffs.Checklist
type(scope): descriptionconvention withRelates to #<issue>footerSummary
hal/registers/component/iomux.h/instance/iomux.h: MSS_IOMUX register description (49-entryPADxx_CFG_REGarray,USERMODEEN/PADGLBLCFGREG/IOCFGKICK0/IOCFGKICK1)hal/mss/pinmux/hal_pinmux.c/.h:hal_pinmux_set_pin_function()— unlock/write/re-lock sequence with bounds checkinghal/registers/awr6843aop.h: wiresIOMUXtyped macro in both assembly and C variants; removes the now-supersededMSS_IOMUX_BASE_ADDRESSplaceholdertesting/mss/unit/hal_functionality/test_pinmux.c(+CMakeLists.txt): Catch2 functional test suite. No naming collision.testing/support/fakes/registers/awr.h/hw_fakes.c: newfake_iomuxregister shimzephyr/Kconfig/zephyr/CMakeLists.txt/hal/util/hal_config_mss.h/template/hal_config_mss_template.h:HAL_AWR6843_PINMUXKconfig option andENABLE_PINMUX_MODULEbridgetools/misra/run_misra.sh:-DENABLE_PINMUX_MODULEadded