Corrected M33 breakpoint control.
The address for FPCtrl was updated to 0xE000_2000.
The bitfield for bp_addr needed to have the data shifted right one bit.
Updated the NAME for the FpCompX Core Register to match the struct.
@@ -204,8 +204,8 @@ impl<'probe> CoreInterface for M33<'probe> {
fn set_breakpoint(&mut self, bp_unit_index: usize, addr: u32) -> Result<(), Error> {
let mut val = FpCompX::from(0);
- // clear bits which cannot be set
- let comp_val = addr & 0xff_ff_ff_fe;
+ // clear bits which cannot be set and shift into position
+ let comp_val = (addr & 0xff_ff_ff_fe) >> 1;
val.set_bp_addr(comp_val);
val.set_enable(true);
@@ -535,7 +535,7 @@ impl FpCtrl {
}
impl CoreRegister for FpCtrl {
- const ADDRESS: u32 = 0xE000_2008;
+ const ADDRESS: u32 = 0xE000_2000;
const NAME: &'static str = "FP_CTRL";
}
@@ -561,8 +561,8 @@ bitfield! {
}
impl CoreRegister for FpCompX {
- const ADDRESS: u32 = 0xE000_2000;
- const NAME: &'static str = "FP_CTRL";
+ const ADDRESS: u32 = 0xE000_2008;
+ const NAME: &'static str = "FP_COMPX";
}
impl From<u32> for FpCompX {
