Question:
Why is my SD (SDHC) card not recognized by windows when I use it with the VisualDSP++ 5.0 USB mass storage device example?
Why does the shell_browser or the VisualDSP++ 5.0 eMMCformat examples format SD (SDHC) cards to be half the size of the card?
----------------------------------------------------
Answer:
The VisualDSP++ 5.0 SD card (SDH/RSI) driver incorrectly calculates the size of SDHC cards as half that reported by the card. This means that Windows sees inconsistent information between the formatted volume and the card size. The resolution is to change line 2460 of adi_sdh.c (In Blackfin\lib\src\drivers\pid\sdh) to
pDevice->CardInfo.TotalBlocks = ((pDevice->CardInfo.CardRegisters.sd.csd.c_size + 1) * 1024 ); |
and add the file directly to your project, so that it will override the version in the libdrv library. The attached file contains the above correction.