You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you can change it
uint32_t freq_reg = (float)freq * (float)((1 << 28) / FMCLK); // Tuning word
to
uint32_t freq_reg = ((((float)freq * (1 << 28)) / FMCLK) + 0.5); // Tuning word
It is more accurate.
The text was updated successfully, but these errors were encountered:
I think you can change it
uint32_t freq_reg = (float)freq * (float)((1 << 28) / FMCLK); // Tuning word
to
uint32_t freq_reg = ((((float)freq * (1 << 28)) / FMCLK) + 0.5); // Tuning word
It is more accurate.
The text was updated successfully, but these errors were encountered: