Skip to main content

SD/MMC and uSD cards

The uCOM Carrier Board V3 has one uSD slot for external memory cards on the top of the carrier board. As the name suggests, the uCOM Carrier Board only works with boards in the uCOM form factor.

BoardU-Boot = 2021-04U-Boot 2022.04Linux 5.4.24Linux 6.1
iMX8M Mini uCOMmmc dev 1mmc dev 1/dev/mmcblk1/dev/mmcblk1
iMX8M Nano uCOMmmc dev 1mmc dev 1/dev/mmcblk1/dev/mmcblk1
iMX93 uCOMN/Ammc dev 1N/A/dev/mmcblk1

A uSD memory card is required.

U-Boot

The U-Boot has support for reading/writing memory cards.

Select device and show information

mmc rescan
mmc dev 0
mmc info
Device: FSL_SDHC
Manufacturer ID: 9
OEM: 4150
Name: AF UD
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 981.5 MiB
Bus Width: 4-bit

List content

fatls mmc 0
 1491 btngraph.gif
1396 btnlast.jpg
1266 btnminus.gif
1049 btnnext.jpg
1375 btnplus.gif

Linux

A new memory card will be detected automatically when it is inserted and a message like this one will be printed in the console (example is for iMX6 UltraLite COM board so mmc number is 0).

mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SD card at address b368
mmcblk0: mmc1:b368 AF UD 981 MiB
mmcblk0: p1

To use the memory card it must first be mounted.

mkdir /mnt/sdcard
mount /dev/mmcblk0p1 /mnt/sdcard

The card is now mounted.

df -h
Filesystem       Size    Used  Available Use% Mounted on
/dev/root 3.4G 65.2M 3.2G 2% /
devtmpfs 340.0M 0 340.0M 0% /dev
tmpfs 500.1M 216.0K 499.9M 0% /run
tmpfs 500.1M 76.0K 500.1M 0% /var/volatile
/dev/mmcblk1p1 981.1M 3.8M 977.4M 0% /mnt/sdcard

List the content.

ls /mnt/sdcard
DEFCXX.JS    TXTPSET.XML    digi4.gif     metaserv.js
DEFIO01.JS TXTPSIOA.XML error.gif metaset.htm
DEFIO02.JS TXTPSIOD.XML excanvas.js metaset.js
DEFIO03.JS TXTPSIOS.XML g_hor1.jpg metasys.htm

A good way to stress test the card is to copy a large file to the sdcard and compute a checksum of it (this should be done on a PC with a known good sdcard reader). It is then possible to calculate that checksum again on the target and make sure it matches.

md5sum /mnt/blob.bin
790bfdcdfac22a08ff27450d60be8a8f /mnt/blob.bin

As with the USB memory stick, don't forget to unmount it before physically removing it from the carrier board.

umount /mnt/sdcard