diff --git a/src/peripheral/itm.rs b/src/peripheral/itm.rs index b3e8bd9f..db08b84d 100644 --- a/src/peripheral/itm.rs +++ b/src/peripheral/itm.rs @@ -340,11 +340,14 @@ impl ITM { unsafe { self.tcr.modify(|mut r| { - r.set_itmena(settings.enable); r.set_tsena(settings.local_timestamps != LocalTimestampOptions::Disabled); r.set_txena(settings.forward_dwt); // forward hardware event packets from the DWT to the ITM r.set_tracebusid(settings.bus_id.unwrap_or(0)); + // must be modified after TraceBusID, see last section in + // + r.set_itmena(settings.enable); + r }); }