diff --git a/targets/stm32l432/src/device.c b/targets/stm32l432/src/device.c index b04a640..4073fe7 100644 --- a/targets/stm32l432/src/device.c +++ b/targets/stm32l432/src/device.c @@ -577,7 +577,11 @@ uint32_t ctap_atomic_count(uint32_t amount) return lastc; } - lastc += amount; + if (amount > lastc){ + lastc = amount; + } else { + lastc += amount; + } if (lastc/256 > erases) {