PHYTEC
Page 25
eMMC Devices
PHYTEC modules like phyCORE-i.MX 8M Plus are populated with an eMMC memory chip as the main storage. eMMC devices contain raw MLC memory
cells combined with a memory controller that handles ECC and wear leveling. They are connected via an MMC/SD interface to the i.MX 8M Plus and are
represented as block devices in the
kernel like SD cards, flash drives, or hard disks.
Linux
The electric and protocol specifications are provided by JEDEC (
https://www.jedec.org/standards-documents/technology-focus-areas/flash-memory-ssds-
standard.
PHYTEC currently utilizes the eMMC chips:
eMMC Chip
Size
JEDEC Version
MTFC16GAPALBH-
IT
16 GB
5.1
Extended CSD Register
eMMC devices have an extensive amount of extra information and settings that are available via the
registers. For a detailed list of the
Extended CSD
registers, see manufacturer datasheets and the JEDEC standard.
In the
user space, you can query the registers with:
Linux
target$ mmc extcsd read /dev/mmcblk2
You will see:
=============================================
Extended CSD rev 1.8 (MMC 5.1)
=============================================
Card Supported Command sets [S_CMD_SET: 0x01]
[...]
Enabling Background Operations (BKOPS)
In contrast to raw NAND Flash, an eMMC device contains a Flash Transfer Layer (FTL) that handles the wear leveling, block management, and ECC of
the raw MLC cells. This requires some maintenance tasks (for example erasing unused blocks) that are performed regularly. These tasks are called Backg
(
).
round Operations BKOPS
By default (depending on the chip), the background operations may or may not be executed periodically which impacts the worst-case read and write
latency.
The JEDEC Standard has specified a method since version v4.41 that the host can issue BKOPS manually. See the JEDEC Standard chapter Background
and the description of registers
(Reg: 163) and
(Reg: 164) in the eMMC datasheet for more details.
Operations
BKOPS_EN
BKOPS_START
Meaning of Register
(Reg: 163) Bit
(Bit 0):
BKOPS_EN
MANUAL_EN
Value 0: The host does not support manual trigger of BKOPS. Device write performance suffers.
Value 1: The host does support manual trigger of BKOPS. It will issue BKOPS from time to time when it does not need the device.
The mechanism to issue background operations has already been implemented in the
kernel since
. You only have to enable BKOPS_EN on the
Linux
v3.7
eMMC device (see below for details).
The JEDEC standard
introduces a new automatic BKOPS feature. It frees the host to trigger the background operations regularly because the device
v5.1
starts BKOPS itself when it is idle (see the description of bit
in register
(Reg: 163)).
AUTO_EN
BKOPS_EN
The userspace tool
does not support enabling automatic BKOPS features so far.
mmc
To check whether
is set, execute:
BKOPS_EN
target$ mmc extcsd read /dev/mmcblk2 | grep BKOPS_EN
The output will be, for example: