diff --git a/cores/arduino/HardwareTimer.h b/cores/arduino/HardwareTimer.h index d975ffb1b2..c019e44043 100644 --- a/cores/arduino/HardwareTimer.h +++ b/cores/arduino/HardwareTimer.h @@ -112,7 +112,7 @@ class HardwareTimer { void setPrescaleFactor(uint32_t prescaler); // set prescaler register (which is factor value - 1) uint32_t getPrescaleFactor(); - void setOverflow(uint32_t val, TimerFormat_t format = TICK_FORMAT); // set AutoReload register depending on format provided + void setOverflow(uint64_t val, TimerFormat_t format = TICK_FORMAT); // set AutoReload register depending on format provided uint32_t getOverflow(TimerFormat_t format = TICK_FORMAT); // return overflow depending on format provided void setPWM(uint32_t channel, PinName pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); // Set all in one command freq in HZ, Duty in percentage. Including both interrupt. diff --git a/libraries/SrcWrapper/src/HardwareTimer.cpp b/libraries/SrcWrapper/src/HardwareTimer.cpp index 231f53f41d..94d6ca7841 100644 --- a/libraries/SrcWrapper/src/HardwareTimer.cpp +++ b/libraries/SrcWrapper/src/HardwareTimer.cpp @@ -518,7 +518,7 @@ uint32_t HardwareTimer::getOverflow(TimerFormat_t format) * HERTZ_FORMAT: overflow is the frequency in hertz for overflow * @retval None */ -void HardwareTimer::setOverflow(uint32_t overflow, TimerFormat_t format) +void HardwareTimer::setOverflow(uint64_t overflow, TimerFormat_t format) { uint32_t ARR_RegisterValue; uint32_t PeriodTicks;