Article ID: 070917sab
Last Reviewed: July 6, 2023
The information in this article applies to:
- Users of the PM7000 who wish to wish to learn more about reformatting a USB flash drive for use with the PM7000.
The term USB flash drive is used here to refer to a memory device with a USB connector such as illustrated below. Other terms such as Thumbdrive or Memory Stick are also in common usage.
Summary
The PM7000 provides a Host USB interface that can write to USB flash drives, such as a memory stick.
This application note details the steps to format a suitable USB Flash Drive to optimise it for use with the PM7000.
You will need:
- A USB memory device
- A PC with Windows 7, 8, 10, or 11
Background information on partitioning of memory devices
Clearly large devices are more useful than small ones. However some large devices may be built using a multi-level cell technology (MLC) which may make them slower than other single level cell devices (SLC).
Sectors and clusters
A memory device is divided into “clusters”, each of which is subdivided into “sectors”. The sequence of clusters as well as other file details are held in the “File Allocation Table” (FAT). The number of clusters and the size of each one (from 512 bytes up to 32768 bytes) are set in the device formatting process. Each cluster is used to hold one file or part of a file, so small files can be held in 1 cluster, and large files can be held in multiple clusters. Because an entire cluster is the minimum space allocated to a single file, small memory devices tend to come formatted with relatively small clusters. This enables a large number of small files to be stored efficiently, whereas larger clusters are inefficient and wasteful if typical files are small. However there is a speed overhead associated with the housekeeping of small clusters which is reduced when cluster size is increased. Consequently larger devices tend to be formatted with larger clusters, since speed is likely to be more significant than the waste associated with small files.
Choosing cluster size for the PM7000
PM7000 files come into the large category, therefore whatever size of device is chosen, it should be formatted with the largest clusters possible, ideally 32kByte.
USB Memory Device limitations
The drivers used in the PM7000 for USB memory devices have the following limitations:
- Partition formats supported: FAT16 and FAT32.
- Partition size limit: untested but assume a limit at 128 GB.
- Number of files in a directory: 1022 ( or 65534 ).
- The Drivers in the PM7000 are unable to allocate additional clusters to a directory. As each file uses 32 bytes from the directory in which it resides, for a drive formatted with 32768 byte clusters this limit is reached when 1022 files are present. For a drive formatted with smaller clusters the limit is corresponding smaller, for example, 4096 byte clusters would hit this limit at 126 files.
- Limitations in Windows 7: there is a FAT32 Partition creation size limit of 32 GB when using the disk management tool. This limitation can be worked round by using the command line and typing the command
> format x: /fs:FAT32 /a:32k
Where x is the letter of the drive you wish to format.
Formatting the USB Flash Drive.
The instructions below are for Windows 10 and 11. Other operating systems will differ slightly.
Following the instructions here and formatting the USB memory device will erase any existing files. Please make sure any important data present on the drive is backed up before the drive is formatted.
To format (or reformat) a device AND to specify the cluster size
- Step 1: Insert the USB device into a USB port on your PC.
- Step 2: Open File Explorer and select “This PC” from the menu pane on the left.
- Step 3: Allow the PC to find the disk drives present, which should include the USB Memory Device. You may have to expand the size of the window pane offered.
- Step 4: Identify the USB device you wish to format, and BE CERTAIN that it is not a drive that is crucial to the computer’s operation.
Beware the format function is very powerful and if you format the PC’s hard drive inadvertently you will lose all your data and your programs. - Step 5: Having identified the correct drive, right click on it, and select “Format”. The following window should pop up:
- Step 6: Open the drop-down menu under “File system”. If the File system offers “FAT”, choose this rather than “FAT32”, as it is slightly faster in operation. Large devices are likely to be FAT32 and you won’t have any choice. For the Allocation Unit Size (Cluster size), choose 32k. Click “Start”.NB: If the operating system is happy to format the drive with the cluster size selected, it will format the drive and return to the display of all the disk drives present. If you get the error message “The Cluster size is too big for the selected file system” , you should repeat the process from Step 4, selecting the next cluster size down until the operating system is happy.
- Step 7: Close down successive windows until you are back at the desktop again.
Note that a slow drive, formatted with small clusters, may be as much as 20 times slower than a large device optimally formatted.
USB memory device operations
Please see our page on USB Memory Device Operations to learn about operations as manual/automatic copying of files onto the USB device, and importing to Pronto.