Add comments for HAL_InitTick function

pull/7225/head
bcostm 2018-06-15 11:19:52 +02:00
parent 8d88bb0ba5
commit 1cef655687
2 changed files with 12 additions and 2 deletions

View File

@ -49,7 +49,12 @@ void timer_oc_irq_handler(void)
}
}
// Reconfigure the HAL tick using a standard timer instead of systick.
// Overwrite the default ST HAL function (defined as "weak") in order to configure an HW timer
// used for mbed timeouts only (not used for the Systick configuration).
// Additional notes:
// - The default ST HAL_InitTick function initializes the Systick to 1 ms and this is not correct for mbed
// as the mbed Systick as to be configured to 1 us instead.
// - Furthermore the Systick is configured by mbed RTOS directly.
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
// Enable timer clock

View File

@ -35,7 +35,12 @@ void timer_irq_handler(void)
}
}
// Reconfigure the HAL tick using a standard timer instead of systick.
// Overwrite the default ST HAL function (defined as "weak") in order to configure an HW timer
// used for mbed timeouts only (not used for the Systick configuration).
// Additional notes:
// - The default ST HAL_InitTick function initializes the Systick to 1 ms and this is not correct for mbed
// as the mbed Systick as to be configured to 1 us instead.
// - Furthermore the Systick is configured by mbed RTOS directly.
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct;