How to Format and Partition an SD Card Larger Than 32GB Using DiskPart in Windows® for MPU
Introduction
To format and partition an SD card larger than 32 GB using DiskPart in Windows® for use with a Microcontroller Processing Unit (MPU), you need to ensure the file system is compatible with your MPU, such as FAT32. This guide will walk you through the necessary steps to prepare your SD card, ensuring it is correctly formatted and partitioned for optimal performance with your MPU.
Create Image File
In this section, you will partition the SD memory card for 4 MB and format it with the FAT file system using Windows utilities DiskPart and Win32 Disk Imager. Second, you will copy the boot.bin and harmony.bin images to the SD memory card.
Partition SD Memory Card with DiskPart Utility
Type the "list disk" command.
Observe the listing of disk drives on your computer. Identify the SD memory card. In the screen capture below, Disk 0 is the main disk and Disk 1 is the SD memory card.
Type the "select disk n" command where "n" is the SD memory card.
Type the "list partition" command.
Observe the partitions on the SD memory card. Identify the partition(s).
Type the "select partition n" command where “n” is the partition to be deleted.
Select the partition to be deleted so that you can create a new partition in the next steps.
Type the "delete partition" command.
The selected partition will be deleted.
Type the "create partition primary size=4" command.
Format the SD memory card 4 MB partition.
The DiskPart command below will format the partition in the FAT file system:
Type the "format" command.