diff --git a/emulation/peripherals/BetrustedEcI2C.cs b/emulation/peripherals/BetrustedEcI2C.cs index 2862b3a37..c3e719c1b 100644 --- a/emulation/peripherals/BetrustedEcI2C.cs +++ b/emulation/peripherals/BetrustedEcI2C.cs @@ -171,7 +171,7 @@ namespace Antmicro.Renode.Peripherals.I2C.Betrusted private void FinishTransaction() { // this.Log(LogLevel.Error, "I2C: Removing clock entry for {0}",this.irqTimeoutCallback); - machine.ClockSource.RemoveClockEntry(FinishTransaction); + machine.ClockSource.TryRemoveClockEntry(FinishTransaction); irqTimeoutCallbackQueued = 0; if (shouldSendTxRxIrq) { diff --git a/emulation/peripherals/BetrustedSocI2C.cs b/emulation/peripherals/BetrustedSocI2C.cs index a471d174e..8d46e887f 100644 --- a/emulation/peripherals/BetrustedSocI2C.cs +++ b/emulation/peripherals/BetrustedSocI2C.cs @@ -162,7 +162,7 @@ namespace Antmicro.Renode.Peripherals.I2C.Betrusted private void FinishTransaction() { - machine.ClockSource.RemoveClockEntry(FinishTransaction); + machine.ClockSource.TryRemoveClockEntry(FinishTransaction); if (shouldSendTxRxIrq) { shouldSendTxRxIrq = false;