SD Card Study Notes

  Recently debugging SD card, encountered some minor problems, record it and share it.

Next to a small switch 1. SD card slot

  We usually seen SD cards are small SD card, it can be placed on the phone. Now most of the development board is a small card slot SD card is inserted, you can just use. But if you want to use the PC to the memory in certain things still need a card reader. A USB card reader type, but also has a big SD card slot, it is expanded into a larger SD card. Large SD cards have a special slot on the laptop (I have). However, SD card slot on the side of a small switch, this switch is a small write-protect switch. In general, the metal contact point for the positive upward direction. Pushed upward, it is readable and writable. Push down yes, yes read-only. This in some U disk, too.

  If the PC does not write into it, he said to be write-protected. Do not doubt SD card (U disk) is broken, first consider the hardware write protection.

  The principle is: the switch is a mechanical switch, if two metal contacts which contact can be written. Otherwise, you can not write.

 

2. SD card distinction

  SD, SDHC, SDXC these three are SD card, with a capacity to distinguish. During an address to read and write, it is quite different.

  SD card, according to the byte address to write (general). SDHC, SDXC card, read and write (general case) sector address. Or according to the sector address and a protocol driver has a certain relationship.

  A sector size is 512 bytes.

 

3. SD read sector address

  We can read and write SD card controller, the address is in accordance with your own design on it.

  Many times, we need some data into a PC to an SD card, and then read by the controller. When reading, you need to know the data storage address. Winhex software can be found using the address data is stored. We use the controller to read and write SD card, using the address found in winhex software, sometimes read out the data is incorrect.

  After continuous find information, we found that the use winhxe software polling data storage address, you can have two addresses: physical and logical addresses. winhex software direct display of logical addresses.

  The controller directly SD card reader, is read in accordance with the physical address. It is necessary to use the logical addresses winhex.

  winhex display logic address is generally in the lower right side winhex software.

 

  I hope useful for learners experiencing the same problem, there is something wrong, ask bigwigs he said.

 

  Xu Hao Shuai child struggles: 18500739518 (QQ, micro-channel). Exchange group: 173 560 979

  

Guess you like

Origin www.cnblogs.com/fendoudexiaohai/p/11699719.html