Skip to content

Instantly share code, notes, and snippets.

@SpinFast
SpinFast / clock.py
Last active November 13, 2023 20:08
imxrt pll sai
# System of equations for optimal clocking
#
# abs(num) < denom
# pll_out = freq*(div_select + num/denom)
# pll_out >= 650000000
# pll_out <= 1300000000
# freq = 24000000
# div_select >= 27
# div_select <= 54
# num >= -pow(2,29)