laanwj / k210-sdk-stuff

Kendryte K210 / MaixGo stuff
ISC License
141 stars 31 forks source link

k210-shared: Rewrite compute_params to use fixed-point #8

Closed Forty-Bot closed 4 years ago

Forty-Bot commented 4 years ago

This code is adapted from a patch I wrote for U-Boot "clk: Add K210 pll support" Forty-Bot/u-boot@7d95737a931974c51d5a96ec96bf08a6a030f691. Significant reference was made to the datasheet for the PLL, which may be found by searching for "tcitsmcn40ggpmplla1". For testing, I use a "brute force" version of the algorithm which is significantly simpler code-wise.

I've tried to document everything thoroughly, but please let me know if there are any areas which need improvement.

I'm not to familiar with rust. I've tried to the best of my ability to do things idiomatically. However, this code may retain more than a bit of its c roots.

laanwj commented 4 years ago

Thanks! (I only noticed this now, sorry).