Skip to content

Commit 1a21591

Browse files
bors[bot]sphw
andauthored
Merge #422
422: Add ITNS field to NVIC peripheral r=adamgreig a=sphw This PR adds the ITNS (Interrupt Target Non-secure) field to the NIVC peripheral. This field is required to write a boot loader for TrustZone-M devices, since it allows the user to use interrupts from non-secure states. I believe I have maintained the correct padding for the next fields, but I have not tested these changes on a non M33 device. So a close review and test would be appreciated. Co-authored-by: Sascha Wise <[email protected]>
2 parents 90c1cb6 + 9bff0c8 commit 1a21591

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Diff for: src/peripheral/nvic.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ pub struct RegisterBlock {
3636
#[cfg(armv6m)]
3737
_reserved4: [u32; 16],
3838

39-
_reserved5: [u32; 48],
39+
_reserved5: [u32; 16],
40+
41+
#[cfg(armv8m)]
42+
/// Interrupt Target Non-secure (only present on Arm v8-M)
43+
pub itns: [RW<u32>; 16],
44+
#[cfg(not(armv8m))]
45+
_reserved6: [u32; 16],
46+
47+
_reserved7: [u32; 16],
4048

4149
/// Interrupt Priority
4250
///
@@ -67,7 +75,7 @@ pub struct RegisterBlock {
6775
pub ipr: [RW<u32>; 8],
6876

6977
#[cfg(not(armv6m))]
70-
_reserved6: [u32; 580],
78+
_reserved8: [u32; 580],
7179

7280
/// Software Trigger Interrupt
7381
#[cfg(not(armv6m))]

0 commit comments

Comments
 (0)