Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional SPI clock choices in SPI.cpp #22

Open
manitou48 opened this issue Dec 1, 2016 · 0 comments
Open

additional SPI clock choices in SPI.cpp #22

manitou48 opened this issue Dec 1, 2016 · 0 comments

Comments

@manitou48
Copy link

manitou48 commented Dec 1, 2016

In forum discussions, a user noted that with T3.6@180mhz (bus 60 mhz), requesting a SPI clock of 4 MHz did not give exactly 4 mhz. Originally, i thought it was just discretization error based on available dividers. But i have a perl script that will give me the "best" CTAR settings for given bus speed and desired SPI clock. There is a CTAR setting (0xb80020002) that gives 4mhz, but it's not in the ctar_div_table in SPI.cpp. You might wish to expand the div and clock table. You have 23 entries, but there are 42 entries with BR in the range 0 to 8.

2 3 4 5 6 7 8 9 10 12 14 15 16 18 20 21 24 28 30 32 40 42 48 56 64 80
96 112 128 160 192 224 256 320 384 448 512 640 768 896 1280 1792

https://forum.pjrc.com/threads/40394-SPI-clock-not-uniform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant