File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ namespace {
66
66
constexpr int TIMER_INDEX = 4 ; // Use TIM4
67
67
constexpr int TIMER_PRESCALAR = 39 ; // Input clock = 40MHz_XTAL / (39 + 1) = 1MHz
68
68
constexpr int TIMER_COUNTER_US_THRESHOLD = 1 ; // 1us = 1tick
69
- constexpr int US_PER_OVERFLOW = 65536 ; // 65536us
69
+ constexpr uint64_t US_PER_OVERFLOW = 65536 ; // 65536us
70
70
constexpr int TIMER_IRQ_PRIORITY = 0 ; // Default priority in the close-source timer driver per FAE
71
71
constexpr IRQn_Type TIMER_IRQ[] = {
72
72
TIMER0_IRQ,
@@ -183,7 +183,7 @@ class RtlTimer {
183
183
uint64_t getTime () {
184
184
#ifndef HAL_TIMER_USE_SYSTIMER_ONLY
185
185
auto state = getOverflowCounterWithTick ();
186
- return usSystemTimeMicrosBase_ + state.overflowCounter * US_PER_OVERFLOW + ticksToTime (state.curTimerTicks );
186
+ return usSystemTimeMicrosBase_ + state.overflowCounter * ( uint64_t ) US_PER_OVERFLOW + ticksToTime (state.curTimerTicks );
187
187
#else
188
188
return sysTimerUs ();
189
189
#endif // HAL_TIMER_USE_SYSTIMER_ONLY
You can’t perform that action at this time.
0 commit comments