fix(pinmux): write PADCFG fields separately instead of combined #123

Merged
hoogv merged 1 commit from fix/122-pinmux-field-writes into dev 2026-07-23 22:47:40 +00:00
Owner

Closes #122.

hal_pinmux_set_pin_function()'s single combined write to PADxx_CFG_REG computes the correct final value but empirically doesn't reach the pad on real hardware. Switching to five separate direct field writes (matching the hardware-confirmed reference driver, Universal_hal's pinmux_iwr68xx.c) fixed it -- confirmed via a controlled bisection on real AWR6843AOP hardware (same MPU config, same GPIO driver, only this function swapped between the two write styles).

Local verification:

  • ctest: 403/403 passing (clean full rebuild)
  • MISRA (tools/misra/run_misra.sh): 0 findings
  • clang-format --dry-run --Werror: clean

PR_Size/S

Closes #122. `hal_pinmux_set_pin_function()`'s single combined write to `PADxx_CFG_REG` computes the correct final value but empirically doesn't reach the pad on real hardware. Switching to five separate direct field writes (matching the hardware-confirmed reference driver, `Universal_hal`'s `pinmux_iwr68xx.c`) fixed it -- confirmed via a controlled bisection on real AWR6843AOP hardware (same MPU config, same GPIO driver, only this function swapped between the two write styles). Local verification: - `ctest`: 403/403 passing (clean full rebuild) - MISRA (`tools/misra/run_misra.sh`): 0 findings - `clang-format --dry-run --Werror`: clean PR_Size/S
fix(pinmux): write PADCFG fields separately instead of combined
All checks were successful
lint / clang-format (pull_request) Successful in 10s
tests / host-tests (pull_request) Successful in 48s
lint / clang-format (push) Successful in 10s
lint / misra (pull_request) Successful in 1m12s
tests / host-tests (push) Successful in 46s
lint / misra (push) Successful in 1m11s
e5b0d2fd3f
hal_pinmux_set_pin_function() computed the target PADxx_CFG_REG value
and wrote it in one combined store -- logically equivalent to the
reference driver, same final value, but the pad never actually
reached its requested function on real hardware.

The reference driver (Universal_hal's pinmux_iwr68xx.c, hardware-
confirmed) does five separate sequential field writes instead. Switching
to that exact pattern fixed it, confirmed via a controlled bisection on
real AWR6843AOP hardware.

No documented reason is available for why this register needs
field-at-a-time writes; carried forward as empirically confirmed, same
as this driver's other undocumented specifics.

Fixes #122
hoogv deleted branch fix/122-pinmux-field-writes 2026-07-23 22:47:40 +00:00
hoogv added this to the Development project 2026-07-23 22:47:45 +00:00
hoogv self-assigned this 2026-07-23 22:47:46 +00:00
Sign in to join this conversation.
No reviewers
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
opendutchsolutions.public/hal_awr6843!123
No description provided.