hal_utils_calc_clk_div_frac_accurate() function
Calculate the clock division with fractal part accurately
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
Accuracy first algorithm, Time complexity O(n). About 1~hundreds times more accurate than the fast algorithm
![]()
hal_utils_calc_clk_div_frac_accurate(&i2s_clk_info, mclk_div);
hal_utils_calc_clk_div_frac_accurate() is called by 1 function and calls 3 functions:
![]()
hal_utils_calc_clk_div_frac_accurate()
hal_utils_calc_clk_div_frac_accurate() reads 5 variables and writes 3 variables:
![]()
hal_utils_calc_clk_div_frac_accurate()