]> granicus.if.org Git - esp-idf/commit
sdmmc: set highest possible host clock divider
authorIvan Grokhotkov <ivan@espressif.com>
Thu, 17 Aug 2017 16:18:55 +0000 (00:18 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 11 Apr 2018 03:06:50 +0000 (11:06 +0800)
commitf02cff13cc264fdc5f7d520b077ca4707f83a9ec
treeb405cb27f23ff053120b3364e8e4075311c52aa4
parent84d6793f77af9345ea07d126ed03cc8e3f0c57f5
sdmmc: set highest possible host clock divider

SDMMC host suffers from an issue that it outputs data near the rising
edge of the card clock, which is the edge used by the card to sample
data. If sampling time constraint is not satisfied, card may read data
after the transition.

The phases of output/input data can, in fact, be adjusted. However this
adjustment happens in the clock generation block outside of the host.
So the maximum phase change which can be created this way is equal to
half of the host clock period. So if the host clock is set to the lowest
possible frequency (for the given card frequency), then the phase offset
(and hence the hold time) will be the highest. This change modifies the
logic used to determine clock dividers accordingly.

sdmmc host: set correct dout phase and print correct frequency
components/driver/sdmmc_host.c