2
\$\begingroup\$

The 2GB micro SD card i'm working on looks initialized,all commands are giving the correct answer(i.e. CMD 8 returns the echo of the argument),command ACMD41 returns 0.At that point i try to read 512 bytes with command 17.I checked on PC that the bytes are all 0 until the MBR address,but on scope i have the SD Out stuck high. So i read lot of 0xFF . How can it be? Many thanks. Diego

\$\endgroup\$
  • 1
    \$\begingroup\$ "So i read lot of 0xFF" - How many? You may have to keep polling for a couple of ms until the requested data is output by the card. \$\endgroup\$ – JimmyB Jul 27 '17 at 10:26
  • 1
    \$\begingroup\$ It sounds like you are expecting a response from an SDHC (High Capacity) card (512 bytes per read). But it appears you are using a regular SD card (1 byte per read). 2GB is usually the size threshold between SDHC and SD (2GB or less are usually the SD type). If this is the case, test a >2GB SDHCcard with your code. If it works, let me know and I'll post a more complete answer. \$\endgroup\$ – st2000 Jul 27 '17 at 12:17
  • \$\begingroup\$ Thanks,Jimmy B,could you explain the use of polling? I don't understand:if my polling is the periodic sending of clock packets how can i say if a series of 0xFF is real datas or just the SD Card DO still stuck at high level? \$\endgroup\$ – Diego Colombo Jul 31 '17 at 8:42
  • \$\begingroup\$ Thanks ST2000,i'll do for further experience and information.By now the boss told me to drop that 2GB SD card.It is probably discontinued,and we bought for test some 8 GB SDHCs,Kingston and having a real datasheet i Of course i soon faced another problem,but it so specific that i think that deservers another topic. Thanks and once i've solved that i'll try with sizes >2 GB to see what's happens.Thanks. \$\endgroup\$ – Diego Colombo Jul 31 '17 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.