hal_utils_calc_clk_div_frac_fast() function
Calculate the clock division with fractal part fast
Arguments
clk_info
The clock information
clk_div
The clock division with integral and fractal part
Return value
- 0: Failed to get the result because the division is out of range - others: The real output clock frequency
Notes
Speed first algorithm, Time complexity O(log n). About 8~10 times faster than the accurate algorithm
hal_utils_calc_clk_div_frac_fast() calls 3 functions:
![]()
hal_utils_calc_clk_div_frac_fast()
hal_utils_calc_clk_div_frac_fast() reads 5 variables and writes 3 variables:
![]()
hal_utils_calc_clk_div_frac_fast()