09-13-2016, 03:16 AM
(09-12-2016, 07:11 PM)clarkss12 Wrote:(09-12-2016, 06:58 PM)MarkHaysHarris777 Wrote:(09-12-2016, 06:46 PM)clarkss12 Wrote: Just reformat it with command prompt in Windows. Only smacking them with a hammer can kill them.
If only that were true.
... take a look at this link to understand SPI and SD cards.
You may have noticed the large number of people who are having trouble writing their image(s) to the SD card and getting the pine board to boot. This is NOT due to bad hardware , and is usually not due to bad software, but is almost always due to the fact that SD cards are easily corrupted and sometimes permanently damaged because of improper shutdown and improper software access in other devices (as well corrupted--- as in permanently damaged cells in the flash area of the card.
The reason reformatting does not work to correct the card is that the image write process (dd and win32diskimager) do not follow the 'formatting' , rather they write the disk image ( tree, meta-data, and data) out to the card bit-for-bit. If the SD card is not compatible with the binary image, if it has holes in the flash, if its structure is damaged from improper access or shutdown, that write will never work again and the card is not worth the plastic its encased in.
This is the reason I only use NEW cards; Samsung evo plus Class 10 32Gb cards are the best bet...
... always shutdown properly, and never just yank an SD card ! YMMV
Wow, never heard of that, I have never killed a SD card.
Well, maybe that's caused by you talking about SD cards and SDIO and him talking about raw NAND and SPI (for whatever reasons he's doing that, I still hope his goal is not constantly spreading confusion).
SD cards always contain a controller (called FTL, Flash Translation Layer), you never deal with physical addresses but only logical addresses (otherwise using FS like FAT/FAT32 would ruin your SD card within hours/days). The FTL maps out bad pages on the fly and does all the wear-leveling in the background. Modern SD cards also do a lot of over-provisioning that means they do not expose all the pages they contain but have a spare area they use to make wear-leveling more efficient and to compensate from bad pages (that are mapped away and replaced by one from the spare area).
Most importantly: every time you try to overwrite a logical page a new physical page will be used (since NAND would be broken pretty fast due to limited count of write cycles and also be slow as hell otherwise since you can't overwrite anything there, it's all about reading, writing and deleting -- happens in the background)
All of this is done in the background, you won't even be able to notice that (only based on specific performance tests) and it's perfectly fine to write OS images the traditional way since FTL handles everything needed. The reason the forums here are full of posts from people failing to write images appropriately is mainly caused by wrong/unclear information (and a few moderators unfortunately play a specific role in confusing users)
Further reading:
- https://www.raspberrypi.org/forums/viewt...09#p587575
- http://3gfp.com/wp/2014/07/formatting-sd...-lifetime/ (start from 'SD card addressing is logical, not physical')
- https://www.bunniestudios.com/blog/?page_id=1022 (start from 'Overall, the MicroSD card market is a fascinating one')