HAL_InitTick
Function name
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
Function description
ฟังชั่นนี้กำหนดค่าแหล่งของ the time base.
Parameters
• TickPriority: Tick interrupt priority.
Return values
• HAL: status
Notes
• function นี้ถูกเรียกโดยอัตโนมัติที่ the beginning of the program หลังจาก reset โดย HAL_Init() หรือที่เวลาใดๆเมื่อ
clock ถูกกำหนดค่าใหม่โดย HAL_RCC_ClockConfig().
• ในการจัดให้มีใช้โดยเริ่มต้น, SysTick timer เป็น the source of time base มันถูกใช้เพื่อสร้าง interrupts ในคาบเวลาที่
คงที่. ต้องใช้ความระมัดระวัง ถ้า HAL_Delay() ถูกเรียกจาก a peripheral ISR process, the SysTick interrupt ต้องมี
priority (ตัวเลขน้อยกว่า) สูงกว่า the peripheral interrupt. มิฉะนั้น the caller ISR process จะถูกบล็อก. The
function ถูกประกาศเป็น __weak ที่จะถูกเขียนทับในกรณีของการจัดให้มีใช้อื่นใน user file.