diff options
author | 2022-05-08 09:09:49 +0000 | |
---|---|---|
committer | 2022-05-08 09:09:49 +0000 | |
commit | 4e908625204a1e95dd3fd5bdcd8d66d6bc11c3bc (patch) | |
tree | 5412fef9fe13fcb3514668c70966a88111756d61 | |
parent | 02def0765036957facc358eed1ecfad0f9365902 (diff) | |
parent | 3c67b4ced9b10546c92e36a935c2e27e0df3281b (diff) | |
download | cortex-m-4e908625204a1e95dd3fd5bdcd8d66d6bc11c3bc.tar.gz cortex-m-4e908625204a1e95dd3fd5bdcd8d66d6bc11c3bc.tar.zst cortex-m-4e908625204a1e95dd3fd5bdcd8d66d6bc11c3bc.zip |
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 <me@luojia.cc>
-rw-r--r-- | src/cmse.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmse.rs b/src/cmse.rs index 36d7447..7826bb8 100644 --- a/src/cmse.rs +++ b/src/cmse.rs @@ -174,9 +174,9 @@ impl TestTarget { /// * the TT instruction was executed from an unprivileged mode and the A flag was not specified. #[inline] pub fn mpu_region(self) -> Option<u8> { - if self.tt_resp.srvalid() { - // Cast is safe as SREGION field is defined on 8 bits. - Some(self.tt_resp.sregion() as u8) + if self.tt_resp.mrvalid() { + // Cast is safe as MREGION field is defined on 8 bits. + Some(self.tt_resp.mregion() as u8) } else { None } |