Hi
I am having problems getting i.MXRT to boot from eMMC. My current setup is the EVB with an uSD to eMMC converter connected in the uSD socket (J20).
I am able to communicate with the eMMC from my application code if i load it into hyperflash. So HW setup should be fine.
With help from the forum i managed to create an image that i can program to SD with MFGTool, and afterwards boot from SD, but when i switch to eMMC, MFGTool fails during programming with the following in the log.
ModuleID[2] LevelID[1]: Program Boot image [WndIndex:0] {
"command" : "receive-sb-file",
"response" : [],
"status" : {
"description" : "1812 (0x714) Send Operation Condition failed",
"value" : 1812
}
}
I have the following emmc config in my bd file.
# The source block assign file name to identifiers
sources {
myBootImageFile = extern (0);
}# The section block specifies the sequence of boot commands to be written to the SB file
section (0) {#1. Prepare MMC Card option block
#Load : 1 bit SDR, Normal Speed, Boot partition 1.
#Boot : Boot partition 1, 1 bit SDR, normal speed# 1bit SDR, Normal Speed, Boot partition 1.
load 0xC1100001 > 0x100;
load 0x00000000 > 0x104;#2. Configure MMC Card
enable mmccard 0x100;#3. Erase blocks as needed.
erase mmccard 0x400..0x100000;#4. Program MMC Card Image offset 0x400
load mmccard myBootImageFile > 0x400;
#5. Program Efuse for optimal read performance (optional)
#load fuse 0x00000000 > 0x07;}
I also tried using blhost directly with the follwing result:
>blhost -u 0x15a2,0x0073 fill-memory 0x20000000 0x4 0xC0000000
Inject command 'fill-memory'
Successful generic response to command 'fill-memory'
Response status = 0 (0x0) Success.>blhost -u 0x15a2,0x0073 fill-memory 0x20000004 0x4 0x00040000
Inject command 'fill-memory'
Successful generic response to command 'fill-memory'
Response status = 0 (0x0) Success.>blhost -u 0x15a2,0x0073 configure-memory 0x121 0x20000000
Inject command 'configure-memory'
Response status = 1812 (0x714) Send Operation Condition failed
To me it looks like the bootloader isn't able to communicate with the card at all. Since the eMMC is connected to the uSD socket (J20), it is fixed to 3V mode. I wonder if the bootloader will try switch to 1V8 during the card init, and that would cause the communication to fail.
Anybody succesully programmed an EMMC card with MfgTool og blhost on iMXRT ?
Is source code for the MCUX flash loader available ?
Br
Anders
As mentioned above, I have completed a set of patches against the SDK. Repository hosted here:
GitHub - apexrtos/imxrt1060_flashloader: Flash loader for i.MXRT1060 forked from NXP SDK 2.6.2
- Richard.
For anyone that comes across this problem in the future.
After looking through the code I have discovered that the Flashloader (Version K2.1.0) ONLY supports eMMC on uSDHC instance 2. This is hard coded. Unfortunately, from the looks of it, this cannot be changed via configuration.
SDK_2.6.2_EVK-MIMXRT1060/middleware/mcu-boot/targets/MIMXRT1062/src/bootloader_config.h:
I will have to recompile to get it to support the EVB and our custom board, which has the eMMC device on uSDHC instance 1.
Maybe someone from NXP can look in to getting an updated version of the Flashloader binary released which allows us to pass the uSDHC instance as a parameter? This is what I will be doing, I could post a patch once complete.
- Richard.
Hi Anders,
Did you ever get this resolved? I am now facing a similar issue.
Using the MIMXRT1060-EVK with an eMMC device plugged in to the SD Socket via an adapter:
blhost -u -- fill-memory 0x20000000 4 0xC0000000 <-- Have tried various options here
blhost -u -- configure-memory 0x121 0x20000000
Results in:
Response status = 1812 (0x714) Send Operation Condition failed
@Jay Heng's GUI tool gives me the same result.
FYI, the source seems to be now available for the Flashloader...
SDK_2.6.2_EVK-MIMXRT1060/middleware/mcu-boot/
...Time to dig through it.
- Richard.
You can try this GUI tool, it supports eMMC device
Hi Anders,
You could refer to application note AN12107 “How to Enable Boot from Octal SPI Flash and SD Card” at the following link:
https://www.nxp.com/docs/en/application-note/AN12107.pdf
Additionally, you could take a look at the following Community thread regarding the differences between a regular SD card, and a eMMC chip:
https://community.nxp.com/thread/352318
Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Carlos
Thank you for your response.
I am aware of AN12107 and the forum thread you are referring to. I am able to boot from SD card by following the procedure in the app note, however i am struggling getting MFGTool to communicate/program, the eMMC card. As mentioned I have no option for running 1.8v mode for the eMMC card on the evaluation board since it is connected to via uSD card slot.
Looking at the eMMC driver in the SDK, I suspect it could be related voltage shifting during card setup, and that is why i would like to have a look at the source code for the flashloader that comes with the MfgTool package.
This thread https://community.nxp.com/message/1004044?commentID=1004044#comment-1004044 indicates that source for the flashloader would be made available. But it does not seem to be yet.
Hope you will be able to help get access to the source.
Best regards
Anders
Hi Anders,
After internally asking, I'm afraid that the Flashloader source code is not available for the public yet.
Hope this will be useful for you.
Best regards!
/Carlos