Enabling eMMC Write Reliability on Apalis IMX8

Hi,

I am trying to enable WRREL on the onboard eMMC of the the Apalis iMX8QM 4GB WB by following the instructions in this guide: eMMC (Linux) | Toradex Developer Center

I used the output of cat /sys/class/block/mmcblk0/size which was 61120512 in my case, but it didn’t work, it gave a mis-alignment error.

I then tried the number from the example (31080448) and it looks like the max allowed enhanced size is 1243. Is this correct? That is only 9.7Gb. Does this mean I can only use 9.7Gb of my 32Gb eMMC if I want to use it with WRREL on?

Here are the commands I tried:


U-Boot 2022.04-6.4.0-devel+git.dc27426aa417 (Sep 25 2023 - 13:34:50 +0000)

CPU: NXP i.MX8QM RevB A53 at 1200 MHz at 67C

DRAM: 4 GiB

Core: 193 devices, 19 uclasses, devicetree: separate

MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2

Loading Environment from MMC... OK

In: serial

Out: serial

Err: serial

Model: Toradex 0037 Apalis iMX8QM 4GB WB IT V1.1E

BuildInfo:

- SCFW 6638c032, SECO-FW c9de51c0, IMX-MKIMAGE 3bfcfccb, ATF 3c1583b

- U-Boot 2022.04-6.4.0-devel+git.dc27426aa417

flash target is MMC:0

Net: eth0: ethernet@5b040000

Fastboot: Normal

Normal Boot

Hit any key to stop autoboot: 0

Apalis iMX8 # mmc info

Device: FSL_SDHC

Manufacturer ID: 70

OEM: 0

Name: IX2932

Bus Speed: 49500000

Mode: MMC High Speed (52MHz)

Rd Block Len: 512

MMC version 5.1

High Capacity: Yes

Capacity: 29.1 GiB

Bus Width: 8-bit

Erase Group Size: 512 KiB

HC WP Group Size: 8 MiB

User Capacity: 29.1 GiB

Boot Capacity: 4 MiB ENH

RPMB Capacity: 4 MiB ENH

Boot area 0 is not write protected

Boot area 1 is not write protected

Apalis iMX8 # mmc hwpartition user enh 0 61120512 check

Partition configuration:

User Enhanced Start: 0 Bytes

User Enhanced Size: 29.1 GiB

No GP1 partition

No GP2 partition

No GP3 partition

No GP4 partition

User data enhanced area not HC WP group size aligned

Failed!

Apalis iMX8 # mmc hwpartition user enh 0 31080448 check

Partition configuration:

User Enhanced Start: 0 Bytes

User Enhanced Size: 14.8 GiB

No GP1 partition

No GP2 partition

No GP3 partition

No GP4 partition

Total enhanced size exceeds maximum (1897 > 1243)

Failed!

Apalis iMX8 # mmc hwpartition user enh 0 20365312 wrrel on check

Partition configuration:

User Enhanced Start: 0 Bytes

User Enhanced Size: 9.7 GiB

User partition write reliability: on

No GP1 partition

No GP2 partition

No GP3 partition

No GP4 partition

I went ahead and applied the command above to enable WRREL for the entire user area and it ended up bricking my SOM. When I put the system in recovery and load TEZI, I get this error:

Reading the Toradex Config Block failed, the Toradex Config Block might be erased or corrupted.
Please restore the Config Block using the information on the Modules Sticker before continuing.

I am guessing I needed to apply an offset instead of starting the User Enhanced Start from 0?

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Yes, your understanding is correct. When enabling Write Reliability (WRREL) on the onboard eMMC of the Apalis iMX8QM, the usable space is significantly reduced. As per the observations, enabling WRREL restricts the usable space to 9.7 GiB out of the total 29.1 GiB capacity. This is due to the alignment and size constraints when configuring the enhanced area for WRREL. Therefore, if you enable WRREL, you will indeed only be able to use 9.7 GiB of your 32 GiB eMMC for user data. This is a limitation that needs to be considered for applications requiring more storage.

Please, also check if these links can help you solve your problem:

eMMC power fail integrity.

Yes, 1897 * 8 MiB = 9944 MiB, which is approximately 9.71 GiB. Were you able to restore the module’s functionality by entering its parameters via the TEZI GUI?