![]() |
Forum Index : Microcontroller and PC projects : Picomite(2) How to Format drive "B:"
Author | Message | ||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1364 |
Hi all, the manual says on p37 Shouldn't this also apply to drive B:? Drive A: is pretty full, so I don't want to test it for A:. Of course I can format the SD card in the PC, but that takes more effort. The syntax for formatting also seems a bit unusual to me ...? Any ideas? Michael causality ≠ correlation ≠ coincidence |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 9512 |
No. Deliberately not. FatFS has the capability but it is disabled for safety reasons |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1364 |
Many thanks for the quick response! Regards Michael causality ≠ correlation ≠ coincidence |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 431 |
Hm... I don't think it is a bad idea! If the pico mite is a fully self contained computer, it MUST be possible to format drive B... Couldn't you implement a security question? Greetings Daniel |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7106 |
Sorry, but FORMAT is always a bad idea and should only ever be done if it's a new drive, some file system calamity has happened or you need to partition drives. FORMAT isn't even a good idea on "proper" computers with an OS and often needs protection. The Pico isn't really a true stand-alone computer even if it appears to be one. It's so easy to move the SD card to a PC to mess with it if you really need to. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
bfwolf Newbie ![]() Joined: 03/01/2025 Location: GermanyPosts: 26 |
No. Deliberately not. FatFS has the capability but it is disabled for safety reasons I understand Peter's reasons and agree with him! It is really not a good idea to format SD cards using the "standard means". Even formatting SD cards using the standard format tool in Windows is not recommended! Instead, this tool should be used: (Windows and Mac) https://www.sdcard.org/downloads/formatter/ or for Linux: https://www.sdcard.org/downloads/sd-memory-card-formatter-for-linux/ Background: SD cards consist of NAND flash memory chips and a controller that manages them. This controller implements an "FTL" (Flash Translation Layer), which emulates a magnetic data carrier with arbitrarily writable blocks. In fact, the NAND flash memory chips consist of larger erasable sectors that contain 2^n writable blocks. In addition, these erasable sectors become defective over time due to many deletion processes. To avoid this, the FTL carries out "wear leveling" to stress the sectors evenly. The FTL also detects defective sectors and then replaces them with reserve sectors. The strategy used is optimized for the FAT file system. However, a different cluster size is usually used than the one that Windows' own formatting tool would choose, for example. The SD Association's formatting tool reads special information on the SD card (via special registers) to determine the optimal cluster size! Formatting an SD card with Windows' own formatting tool (which was designed for magnetic data storage devices) works, but is not optimal and affects the performance and lifespan of the card! What you can do safely with the Windows formatting tool is "quickformat", because this only initializes the FAT. |
||||
![]() |