SD Card ========= The phyCORE-AM65x SOM brings out a 4-bit wide MMC data bus to the standard SDHC card slot at X13. Power to the card slot is supplied by inserting the appropriate card into the SD/MMC1 connector, which features card detection. This interface shares a bus with the WiFi module on the SOM, but is available on the development kit as an SD card interface for external media or as a bootable interface. .. note:: In order to follow this guide, you will have to boot from the on-board eMMC. Follow this guide in order to flash :ref:`flashemmc-65` .. image:: ../../images/phycore-am65x/pcm-067-sd-x13.webp :width: 800px :alt: phyCORE-AM65x microSD Card Connector Requirements ------------- * SDHC SD card, at least 8GB for PHYTEC's TISDK release image (Included in development kit) * Linux Host PC or Virtual Machine (Ubuntu recommended) (Only for transferring media from Host) * SD card reader (operational under Linux) (Only for transferring media from Host) .. note:: When an external SD Card is inserted, it will be available as /dev/mmcblk1 in Linux. Mounting the SD card ----------------------- * Create a temporary directory and mount an SD card partition using the below commands: .. code-block:: none :caption: Target (Linux) mkdir /home/root/temp mount /dev/mmcblk1p1 /home/root/temp Write to the SD Card ---------------------- * You can use basic Linux commands to create and write files to the SD card. Below is an example: .. code-block:: none :caption: Target (Linux) echo "Hello World" > test.txt cp test.txt /home/root/temp/ Read from the SD Card ---------------------------- * To read what was just written to the SD card in the previous example, use the following command: .. code-block:: none :caption: Target (Linux) cp /home/root/test.txt read.txt * To check that the read file (read.txt) is the same as the one that was written (test.txt) you can use md5sum to compare and verify the data transfer was successful: .. code-block:: none :caption: Target (Linux) md5sum /home/root/test.txt && md5sum read.txt * The above command will generate a long and seemingly random string of characters for both files. This long string is called a "hash" and it uniquely identifies the files. If the hash for both files match then you can be confident that both files (down to each bit) are identical. .. code-block:: none :caption: Expected Output root@am65xx-phycore-kit:~# md5sum /home/root/test.txt && md5sum read.txt e59ff97941044f85df5297e1c302d260 /home/root/test.txt e59ff97941044f85df5297e1c302d260 read.txt Unmounting the SD Card ----------------------- * Before unplugging the device from the development kit, make sure to unmount it in software. You can do this by running the following command: .. code-block:: none :caption: Target (Linux) umount /home/root/temp