Skip to content

Commit 4e90862

Browse files
bors[bot]luojia65
andauthored
Merge #439
439: fix bug on cmse::TestTarget::mpu_region r=thejpster a=luojia65 This function should read `mrvalid` and `mregion` fields from test target result, instead of `srvalid` and `sregion`. Co-authored-by: Luo Jia <[email protected]>
2 parents 02def07 + 3c67b4c commit 4e90862

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cmse.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ impl TestTarget {
174174
/// * the TT instruction was executed from an unprivileged mode and the A flag was not specified.
175175
#[inline]
176176
pub fn mpu_region(self) -> Option<u8> {
177-
if self.tt_resp.srvalid() {
178-
// Cast is safe as SREGION field is defined on 8 bits.
179-
Some(self.tt_resp.sregion() as u8)
177+
if self.tt_resp.mrvalid() {
178+
// Cast is safe as MREGION field is defined on 8 bits.
179+
Some(self.tt_resp.mregion() as u8)
180180
} else {
181181
None
182182
}

0 commit comments

Comments
 (0)