File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ void timer_irq_handler(void)
34
34
35
35
#if defined(TARGET_STM32F0 )
36
36
} // end timer_update_irq_handler function
37
- // Used for mbed timeout (channel 1) and HAL tick (channel 2)
37
+
38
+ // Channel 1 used for mbed timeout
38
39
void timer_oc_irq_handler (void )
39
40
{
40
41
TimMasterHandle .Instance = TIM_MST ;
@@ -49,7 +50,12 @@ void timer_oc_irq_handler(void)
49
50
}
50
51
}
51
52
52
- // Reconfigure the HAL tick using a standard timer instead of systick.
53
+ // Overwrite the default ST HAL function (defined as "weak") in order to configure an HW timer
54
+ // used for mbed timeouts only (not used for the Systick configuration).
55
+ // Additional notes:
56
+ // - The default ST HAL_InitTick function initializes the Systick to 1 ms and this is not correct for mbed
57
+ // as the mbed Systick as to be configured to 1 us instead.
58
+ // - Furthermore the Systick is configured by mbed RTOS directly.
53
59
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority )
54
60
{
55
61
// Enable timer clock
Original file line number Diff line number Diff line change @@ -35,7 +35,12 @@ void timer_irq_handler(void)
35
35
}
36
36
}
37
37
38
- // Reconfigure the HAL tick using a standard timer instead of systick.
38
+ // Overwrite the default ST HAL function (defined as "weak") in order to configure an HW timer
39
+ // used for mbed timeouts only (not used for the Systick configuration).
40
+ // Additional notes:
41
+ // - The default ST HAL_InitTick function initializes the Systick to 1 ms and this is not correct for mbed
42
+ // as the mbed Systick as to be configured to 1 us instead.
43
+ // - Furthermore the Systick is configured by mbed RTOS directly.
39
44
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority )
40
45
{
41
46
RCC_ClkInitTypeDef RCC_ClkInitStruct ;
You can’t perform that action at this time.
0 commit comments