
Originally Posted by
manitou
Upon further review, I think you can improve SDHC clock values in some cases. So if F_CPU is 72mhz, one could get 24mhz SDHC clock SDCLKFS 0, and divisor 3. that is better than your 18 mhz.
Any chance you can tighten up some of the divisors in KinetisSDHC.c, i have a perl script that generates the following divisors
Code:
F_CPU 240000000
400000 (375000) div(64,10)
25000000 (24000000) div(1,10)
50000000 (48000000) div(1,5)
F_CPU 216000000
400000 (375000) div(64,9)
25000000 (24000000) div(1,9)
50000000 (43200000) div(1,5)
F_CPU 192000000
400000 (400000) div(32,15)
25000000 (24000000) div(1,8)
50000000 (48000000) div(1,4)
F_CPU 180000000
400000 (375000) div(32,15)
25000000 (22500000) div(1,8)
50000000 (45000000) div(1,4)
F_CPU 168000000
400000 (375000) div(32,14)
25000000 (24000000) div(1,7)
50000000 (42000000) div(1,4)
F_CPU 144000000
400000 (375000) div(32,12)
25000000 (24000000) div(1,6)
50000000 (48000000) div(1,3)
F_CPU 120000000
400000 (375000) div(32,10)
25000000 (24000000) div(1,5)
50000000 (40000000) div(1,3)
F_CPU 96000000
400000 (400000) div(16,15)
25000000 (24000000) div(1,4)
50000000 (48000000) div(1,2)
F_CPU 72000000
400000 (375000) div(16,12)
25000000 (24000000) div(1,3)
50000000 (36000000) div(1,2)
F_CPU 48000000
400000 (400000) div(8,15)
25000000 (24000000) div(1,2)
50000000 (48000000) div(1,1)
F_CPU 24000000
400000 (400000) div(4,15)
25000000 (24000000) div(1,1)
50000000 (24000000) div(1,1)
I guess I could modify the perl script to generate your macros ....