Reclock spi sdcard access after initialisation
authorrob-ng15 <58272847+rob-ng15@users.noreply.github.com>
Sat, 21 Mar 2020 07:37:21 +0000 (07:37 +0000)
committerGitHub <noreply@github.com>
Sat, 21 Mar 2020 07:37:21 +0000 (07:37 +0000)
commit2bf31a31da336b628825aced248396b8ba3e3105
treee955f9c533dfc04f5516de10eede21c9ff9b6524
parentf03d862c06e5cb8773df43d6799c7d135b8e183a
Reclock spi sdcard access after initialisation

Depends upon https://github.com/enjoy-digital/litex/pull/435

After initialising the card, reclock the card, aiming for ~16MHz (divider is rounded up, as slower speed is safer), but a maximum of half of the processor speed.

Tested with the card being clocked to 12.5MHz on de10nano
litex/soc/software/libbase/spisdcard.c