diff --git a/arch/arm/src/stm32/stm32_iwdg.c b/arch/arm/src/stm32/stm32_iwdg.c index 1230f7128c..b75c06abb2 100644 --- a/arch/arm/src/stm32/stm32_iwdg.c +++ b/arch/arm/src/stm32/stm32_iwdg.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -330,7 +331,7 @@ static int stm32_start(FAR struct watchdog_lowerhalf_s *lower) FAR struct stm32_lowerhalf_s *priv = (FAR struct stm32_lowerhalf_s *)lower; irqstate_t flags; - wdinfo("Entry: started=%d\n"); + wdinfo("Entry: started\n"); DEBUGASSERT(priv); /* Have we already been started? */ @@ -476,9 +477,9 @@ static int stm32_getstatus(FAR struct watchdog_lowerhalf_s *lower, status->timeleft = priv->timeout - elapsed; wdinfo("Status :\n"); - wdinfo(" flags : %08x\n", status->flags); - wdinfo(" timeout : %d\n", status->timeout); - wdinfo(" timeleft : %d\n", status->timeleft); + wdinfo(" flags : %08" PRIx32 "\n", status->flags); + wdinfo(" timeout : %" PRId32 "\n", status->timeout); + wdinfo(" timeleft : %" PRId32 "\n", status->timeleft); return OK; } @@ -507,14 +508,14 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, int prescaler; int shift; - wdinfo("Entry: timeout=%d\n", timeout); + wdinfo("Entry: timeout=%" PRId32 "\n", timeout); DEBUGASSERT(priv); /* Can this timeout be represented? */ if (timeout < 1 || timeout > IWDG_MAXTIMEOUT) { - wderr("ERROR: Cannot represent timeout=%d > %d\n", + wderr("ERROR: Cannot represent timeout=%" PRId32 " > %d\n", timeout, IWDG_MAXTIMEOUT); return -ERANGE; } @@ -622,7 +623,8 @@ static int stm32_settimeout(FAR struct watchdog_lowerhalf_s *lower, } #endif - wdinfo("prescaler=%d fiwdg=%d reload=%d\n", prescaler, fiwdg, reload); + wdinfo("prescaler=%d fiwdg=%" PRId32 " reload=%" PRId64 "\n", + prescaler, fiwdg, reload); return OK; } @@ -653,7 +655,7 @@ void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq) { FAR struct stm32_lowerhalf_s *priv = &g_wdgdev; - wdinfo("Entry: devpath=%s lsifreq=%d\n", devpath, lsifreq); + wdinfo("Entry: devpath=%s lsifreq=%" PRId32 "\n", devpath, lsifreq); /* NOTE we assume that clocking to the IWDG has already been provided by * the RCC initialization logic. @@ -673,7 +675,7 @@ void stm32_iwdginitialize(FAR const char *devpath, uint32_t lsifreq) */ stm32_rcc_enablelsi(); - wdinfo("RCC CSR: %08x\n", getreg32(STM32_RCC_CSR)); + wdinfo("RCC CSR: %08" PRIx32 "\n", getreg32(STM32_RCC_CSR)); /* Select an arbitrary initial timeout value. But don't start the watchdog * yet. NOTE: If the "Hardware watchdog" feature is enabled through the