diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.c b/arch/arm/src/stm32l4/stm32l4_oneshot.c index f247eaefd7..58e5bd49a2 100644 --- a/arch/arm/src/stm32l4/stm32l4_oneshot.c +++ b/arch/arm/src/stm32l4/stm32l4_oneshot.c @@ -313,6 +313,7 @@ int stm32l4_oneshot_start(FAR struct stm32l4_oneshot_s *oneshot, period = (usec * (uint64_t)oneshot->frequency) / USEC_PER_SEC; tmrinfo("usec=%llu period=%08llx\n", usec, period); + DEBUGASSERT(period > 0); DEBUGASSERT(period <= UINT32_MAX); /* Set up to receive the callback when the interrupt occurs */