📜 ⬆️ ⬇️

Everything you wanted to know about SD ...

... but they were afraid to ask.

There were a lot of questions about SD memory cards. This is a big topic, so I’ll tell you what I can and then see what questions will be in the comments. I will answer your questions in the comments or do another review.

What is behind the name?
')
The abbreviation SD originally meant "Secure Digital" ("Digital Security"), but no one ever did anything about "security." The name stuck, despite the fact that it does not mean anything. All types of SD cards are based on NAND flash memory and are used to store data. For yourself, you can think of them as very small hard drives with no moving parts, with very low power consumption. SD, MiniSD and MicroSD (aka TransFlash) are the same thing, and differ only in appearance (size). Smaller cards take up less space on your device, which makes them (devices) even smaller.

Yes, it annoys me that every new phone you buy requires a new, even smaller version of SD. However, I do not think that the phones can become even smaller, and this can be attributed to the good news. In fact, we already need tweezers to insert a microSD card. We will need a microscope if the cards become even smaller.

Does volume matter?

The only negative point of larger cards is their price. The greater the volume of the card, the more it is. They do not consume more energy than small-volume cards and they are not much slower. I use a 2G card in my Windows Mobile device, and it works great. Unfortunately, cards with a capacity of 4G and more likely will not work.

Most cards and reading devices (card readers) comply with the SD version 1.1 specification. This specification limits the size of the card to two gigabytes. There is a new specification version 2.0, which allows larger cards, but Windows Mobile currently does not support SD 2.0. Despite the fact that we (the comment of the translator: hereinafter the word “we” means Microsoft Corporation ) do not support SD 2.0 explicitly, there is an opportunity for our OEMs to add such support on their own (however, I don’t know , has anyone done this). Thus, if your Windows Mobile device is capable of using cards larger than 2G, you don’t need to say that I’m a cheat. Uninformed, yes. Liar - no.

What about speed?

SD cards have different marketing names - Ultra, 133x, High Speed, etc. There are no standards that say what these names mean, so I cannot tell you “Ultra” faster or slower than, for example, “133x”. But I can tell you that there are huge differences in speeds for different SD cards. A few years ago, I made a simple test in which I used an SD card in a card reader, copied about 30M of data (files) onto it, timed up the copy with a stopwatch, and then repeated the procedure with various SD cards. I found some cards that took 30 seconds, while others needed 80.

A faster card can have many benefits. It is detected faster when connected, files are written to it faster, and files are read from it faster. Whether you can detect these differences will depend on how much faster your card is and how large files you transfer.

There is also a small opportunity to save a charge. Power is supplied to the SD card only during data transfer. This way you will spend less battery power if you can transfer your data faster. I have never tested this fact on my own, but I do not think that the gain will be much significant.

How it works?

Each SD card has a small built-in microcontroller. (Present the microcontroller as a simplified processor.) This microcontroller processes the commands between the card and the device in which it (the card) is used, reading the data from the card and writing them to the card. The microcontroller also performs some specific tasks, such as aligning and compressing data. The trick is that the microcontroller only works during data transfer (to or from the card). All central processors and microcontrollers operate due to the frequency of the master oscillator, and the SD card generator is controlled by the device to which the card is connected. If the generator is off, the microcontroller is off as well. The device turns on the generator only for the time of data transfer.

Thus, one card can be faster than another if it has a higher clock frequency. The device “asks” the SD card at which frequency it can operate, and then uses this frequency for the clock generator. At a higher frequency, more data can be transmitted per unit time. This is similar to how the Pentium 3GHz runs faster than the Pentium 3GHz. The number of GHz (gigahertz) - is the processor clock frequency.

Secondly, the speed of the card depends on how the card and device “communicate”. The device sends a command to the card and starts the generator until the card responds. The team may be, for example, “save this data”, the answer to which may be “done, I can take further.” Or the team may be “find this data”, the answer to which may be, “here they are!”. That is why only during one of these commands the card can perform “rough” work: only at this time the generator is working. Thus, a card can receive the command “save this data”, save it, and perform some specific task before answering “done!”. The longer such card-specific tasks are performed (not directly related to a given command), the longer is the data transfer time. Some cards will be more effective in performing their specific tasks than others, and as a result, faster.

Note translator: I would also like to note, if it has not yet become obvious to you that the data transfer rate is a two-way concept, i.e. It depends on the card used and on your device. Even if the card will be able to work at a higher frequency of the master oscillator, but your phone cannot provide it, the data transfer rate will be the lowest value of the device capabilities and the capabilities of the card itself.

Why can't we do more with SD cards?

Frequently asked question: why do we not support the placement of some data on the memory card? For example, we do not support the placement of contacts, meeting schedules, mail on a memory card. (However, we allow storage of attachments on a memory card.) The main problem is that, by nature, a memory card can be removed from the device. Some data types become irrelevant after a certain (rather small) period of time. Synchronization would be difficult if at one moment there were 300 contacts, and after a while there were 10 of them, or not at all (because you removed the memory card from the device). It would be possible to develop some kind of interface that would allow to circumvent and solve this problem, however, it would be very difficult both in writing and in use.

Some data have such a meaning and are used in such a way that it allows them to exist and be available at one time and be inaccessible at another time. Such data include mail attachments and temporary files of Internet Expoler. Note translator: That is why we allow you to make an independent choice as to where they are stored.

It always happens this way: if you allow someone to store contacts on a memory card, they would lose another opportunity. When prioritizing the use of SD cards, we took into account many factors, including the possibility of internal flash memory. We have already seen phones with several gigabytes of internal (built-in) memory. Since such devices are becoming more commonplace, it makes no sense to develop some kind of interface for storing contacts on a memory card that can be retrieved.

Why programs stop working after entering / exiting standby mode?

When PocketPC goes into standby mode, power is not supplied to most of its devices, including the part of the SD card that says whether it is in the slot. While the device is in the standby mode, you can theoretically remove the memory card and replace it with another one. If you do this, then programs that have files open on the card will be confused. In fact, this rarely happens, but we still have to handle this situation. Thus, when the device returns from standby mode, we check whether the card is in the slot. If yes, we check if this is really the same card that was before entering the standby mode. If the memory card does not respond, or responds not as we expect, then we unload all the files open on the memory card and close them.

The problem is that we cannot wait forever until the memory card responds to us. If programs try to access this memory card, we discourage this. So, we set a period of time during which we will wait for the card to respond before concluding about its absence and close all files opened from it (we call this “PnPUnloadDelay”). It is important that some devices can quickly detect a memory card, while others need more time. Because of this, our OEMs choose the correct PnPUnloadDelay parameter value for their equipment on their own, and we trust their settings. If, due to anything, the SD card does not respond within the time specified in the PnPUnloadDelay parameter, we consider that this is a new card or a card is not available.

Much can lead to this. For example, the memory card that you are using may be slower than the one that our OEM expects. This is the case when buying a faster card can help. Or, some application can get out of control and "hang", which will lead to slow system operation and all operations will take a lot of time. Or, perhaps, the OEM made a mistake and set the wait time in the PnPUnloadDelay parameter to be too small.

The value of the PnPUnloadDelay parameter is stored in the registry, however, unfortunately, changing it will not lead to the expected result. Only an OEM can change this value.

Notice that smartphones never go into standby mode, so they are free from this kind of flaws.

Questions?

I think this article covers many of the questions that are often asked about SD cards. If you still have questions, ask them.

- Related articles:

Source: https://habr.com/ru/post/30944/


All Articles