FAQ: VisualDSP++ 5.0 SD card driver reports incorrect size/ fails to be recognized by Windows

Document created by MartinK Employee on Nov 5, 2012Last modified by CraigG on Nov 7, 2012
Version 2Show Document
  • View in full screen mode


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?





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.