File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ void timer_oc_irq_handler(void)
57
57
__HAL_TIM_CLEAR_IT (& TimMasterHandle , TIM_IT_CC2 );
58
58
uint32_t val = __HAL_TIM_GET_COUNTER (& TimMasterHandle );
59
59
if ((val - PreviousVal ) >= HAL_TICK_DELAY ) {
60
- // Increment HAL variable
61
- HAL_IncTick ();
62
60
// Prepare next interrupt
63
61
__HAL_TIM_SET_COMPARE (& TimMasterHandle , TIM_CHANNEL_2 , val + HAL_TICK_DELAY );
64
62
PreviousVal = val ;
Original file line number Diff line number Diff line change 22
22
23
23
extern TIM_HandleTypeDef TimMasterHandle ;
24
24
25
- extern void HAL_IncTick (void );
26
-
27
25
volatile uint32_t PreviousVal = 0 ;
28
26
29
27
void us_ticker_irq_handler (void );
@@ -44,8 +42,6 @@ void timer_irq_handler(void)
44
42
__HAL_TIM_CLEAR_IT (& TimMasterHandle , TIM_IT_CC2 );
45
43
uint32_t val = __HAL_TIM_GET_COUNTER (& TimMasterHandle );
46
44
if ((val - PreviousVal ) >= HAL_TICK_DELAY ) {
47
- // Increment HAL variable
48
- HAL_IncTick ();
49
45
// Prepare next interrupt
50
46
__HAL_TIM_SET_COMPARE (& TimMasterHandle , TIM_CHANNEL_2 , val + HAL_TICK_DELAY );
51
47
PreviousVal = val ;
Original file line number Diff line number Diff line change
1
+ #include "hal/us_ticker_api.h"
2
+
3
+ // Overwrite default HAL function
4
+ uint32_t HAL_GetTick ()
5
+ {
6
+ return ticker_read_us (get_us_ticker_data ()) / 1000 ;
7
+ }
You can’t perform that action at this time.
0 commit comments