feat: VIM driver implementation and host unit tests #103
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#103
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/vim/hal_vim.c— the VIM (Vectored Interrupt Manager) driver implementation, completing the header-only stub landed with ESM (#77/#78).hal_vim_init()resets the VIM and masks every channel;hal_vim_set_priority()/hal_vim_enable()/hal_vim_disable()configure per-channel IRQ/FIQ routing and arm/mask individual channels; the non-weakIRQ_Handler()/FIQ_Handler()decodeVIM_IRQINDEX/VIM_FIQINDEXand forward to the weakhal_vim_process_irq()/hal_vim_process_fiq()hooks, whose default implementations are a fixed per-channel dispatchswitchrouting to every landed peripheral's own named raw device handler (ESM, GPIO, UART, SPI, I2C, MCAN/MCANB, DMM1/DMM2, CBUFF, EDMA_TPCC0/TPTC0/TPTC1, Mailbox).This driver was deliberately deferred until now — its dispatch table references handler symbols from ESM, GPIO, UART, SPI, I2C, DMM, MCAN, CBUFF, Mailbox, and EDMA, so it couldn't link (let alone be meaningfully tested) until all ten of those drivers landed. With EDMA (#101/#102) — the last dependency — merged, every symbol the switch references now exists.
Use Case / Rationale
As a firmware developer, I need the VIM configured and its dispatch table wired to every peripheral driver's raw handler, so a real interrupt from any landed peripheral actually reaches its handler through the CPU's two exception lines.
As a QMS reviewer, I need two separate host-native Catch2 test targets: one overriding the weak dispatch hooks with a strong recorder to test
IRQ_Handler()/FIQ_Handler()'s decode-and-forward logic in isolation, and one linking the real (non-overridden) dispatch switch to exercise its actual per-channel routing — a hard C-linkage constraint (a strong override wins the link for its whole binary) makes both concerns impossible to test in a single target.Acceptance Criteria
hal/mss/vim/hal_vim.cimplemented against this project's currenthal/registers/component/vim.h/instance/vim.htesting/mss/unit/hal_functionality/test_vim.c(IRQ_Handler/FIQ_Handler decode, via a strong hook override) passes underctesttesting/mss/unit/hal_functionality/test_vim_dispatch.c(the real dispatch switch, no override) passes underctestFunctional Impact
None — self-contained addition; completes VIM's header-only stub from #78 now that every peripheral its dispatch table references is landed.
Regulatory Impact
None
QMS Impact
None
Risk Impact
No — existing risk coverage sufficient.
Related Issues / PRs
Relates to #4, relates to #77, relates to #99, relates to #101