-
Notifications
You must be signed in to change notification settings - Fork 8.2k
arch: arm: cortex_m: Allow VTOR to be relocated to TCM #99513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
45bf5f7 to
2c2a8f7
Compare
2c2a8f7 to
8be6da5
Compare
8be6da5 to
2b05585
Compare
|
@dcpleung |
Relocate VTOR from SRAM to ITCM/DTCM to minimize interrupt latency. TCM offers single-cycle access compared to multi-cycle SRAM reads. This improves exception handling speed for real-time workloads. Signed-off-by: Peter van der Perk <[email protected]>
2b05585 to
61d5ada
Compare
|
Could you refer to the MPS3 boards which already use ITCM and DTCM without these extra configs?
Another example where MPS3 board selects SRAM for flash and code but still uses ITCM for vector table:
zephyr/boards/arm/mps3/Kconfig.defconfig Line 43 in 1380739
|
In that example the MPS3 uses DTCM as primary ram setting This is why we depend on In the case for example the
In this case zephyr/boards/arm/mps3/Kconfig.defconfig Line 43 in 1380739
The MPS3 seems to fully executing from ITCM so no XIP from flash but then CONFIG_SRAM_VECTOR_TABLE wouldn't be applicable at all anyhow.
|
|



This change allows you to move the interrupt vector table to ITCM or DTCM instead of SRAM, which provides deterministic, single-cycle access, unlike multi-cycle SRAM reads that may incur additional wait states. This reduces exception entry latency and benefits real-time and interrupt-driven workloads.
Both ITCM and DTCM are supported for vector table placement. ITCM is accessed via the CPU instruction bus and typically provides the lowest possible interrupt latency, making it the preferred location when available. DTCM, while on the data bus, still offers significantly faster and more predictable access compared to SRAM and serves as a suitable alternative where ITCM is unavailable or reserved for hot code.