i.MXRT1050 BOOT from eMMC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MXRT1050 BOOT from eMMC

Jump to solution
8,349 Views
ramreddy
Contributor III

Hello NXP team,

Please help us on this query.

We are using i.MXRT1052 with SDK_2_10_0_EVKB-IMXRT1050 in one of our projects. Our board has provision to boot from SD card and eMMC. We are successfully able to flash the image in SD card and boot from it.

 

Our final aim is to boot from eMMC. The eMMC used on our hardware is Kingston "EMMC04G-W627-X02U". We are able to able to do basic read/write operation on EMMC so connections seems to be fine. However we are not able to boot from EMMC. We have referred other posts, shown below, on NXP forum and Application notes for the same but none of them provides an actual solution for booting from EMMC with imxRT.

https://mcuoneclipse.com/2019/01/22/tutorial-booting-the-nxp-i-mx-rt-from-micro-sd-card/

 

https://community.nxp.com/thread/352318

https://www.nxp.com/docs/en/application-note/AN12107.pdf

https://community.nxp.com/t5/i-MX-RT/i-MXRT1051-eMMC-boot/td-p/806269

 

As per the imxrt1050 Reference Manual the BOOT_CFG and BOOT_MODE pins needs to be configured as below to enable boot from EMMC:

 

BOOT_CFG[0]  :  0

BOOT_CFG[1]  :  1

BOOT_CFG[2]  :  0 or 1(tried both)

BOOT_CFG[3]  :  0

BOOT_CFG[4]  :  0

BOOT_CFG[5]  :  0

BOOT_CFG[6]  :  0

BOOT_CFG[7]  :  1

BOOT_CFG[8]  :  0

BOOT_CFG[9] :  0

BOOT_CFG[10] : 0

 

BOOT_MODE[0] is LOW

BOOT_MODE[1] is LOW

 

We have  flashed the image in eMMC using NXP_BOOT_UTILITY tool V3.3.0 and also able to read back the data written to EMMC using the tool, however device fails to boot-up from EMMC.

After flashing the code using boot utility tool, we are keeping the switches for BT_CFG[6], BT_CFG[9], BOOT_MODE[0] and  BOOT_MODE [1] in low state. But looks like the internal ROM bootloader is not recognizing the changes made.

We also tried probing the EMMC lines during bootup. Our clock line is via GPIO_SD_B1_04. After making the above changes, we probed the CLK line going to eMMC but couldn’t find any clock signal. However clock for SD1_CLK was still there. Seems like the boot device mode is not switching to eMMC.

 

Is there anything missing that needs to be done for booting from iMXRT050? Any configuration which needs to be enabled to make it work? Any leads would be appreciated.

Labels (1)
Tags (3)
0 Kudos
1 Solution
7,302 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @ramreddy 

Thanks for your reply.
Through some rounds of testing, the RT1050 can boot from the eMMC after populating the R160 and R262.
The attached MCU Boot Utility tool has been fixed the defect of programming the eMMC and hello_world.srec is a simple demo for testing, it can print out a string (hello world from emmc.) via UART port (J24).

jeremyzhou_0-1646731895198.png

 

jeremyzhou_1-1646731795569.jpeg

Moreover, I'd like to suggest you may need to optimize the hardware circuit of the board, during the testing, I use the Jlink to connect the J16 for debugging and it sometimes works well, sometimes works bad, in a word, the connection is not stable. I also try to program the image which resides in the SD card to eMMC, however, it doesn't boot up successfully every time, I think it may be related to the power supply circuit of the LCD panel.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
32 Replies
5,795 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
I already received the board and please send a schematic of it to help me to get familiar with the board.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
5,757 Views
ramreddy
Contributor III

Hi,

Thanks for replying.

The attached screenshot represents the eMMC section.

1. Pullups on D0-D7 are DNP.

I'm not having permissions to share the entire schematics with you. If you need any thing related to eMMC I'll share.

Thanks.

Ramreddy.

 

0 Kudos
5,739 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Firstly, let me introduce what problem I encountered.
So far, I've not made the board to enter the Serial Downloader mode,
so you'd better share or upload a hardware setup guide.
Next, I have some inquiries about the board, and please clarify them.
I see the SW1 on the board and I think it's used to configure the boot-up mode, however, it can't configure the RT1050 to select the eMMC as the boot-up device via these four options, so does the board provide other switches or options?
Furthermore, I don't need the complete schematic of the board, I just want the schematic of the minimum system of the RT1050, which includes the boot setting, SDRAM, eMMC, serial port, debug interface, etc.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
5,732 Views
ramreddy
Contributor III

Hi,

Thanks for reply.

I see the SW1 on the board and I think it's used to configure the boot-up mode, however, it can't configure the RT1050 to select the eMMC as the boot-up device via these four options, so does the board provide other switches or options?

We had mounted the eMMC Normal boot mode configurations by using pullup resistors.


Furthermore, I don't need the complete schematic of the board, I just want the schematic of the minimum system of the RT1050, which includes the boot setting, SDRAM, eMMC, serial port, debug interface, etc.

I will share the document containing above points in private chat.

 

Thanks,

Ramreddy.

0 Kudos
5,685 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Sorry for replying late, as the Chinese New Year holidays.
Let me introduce my testing result.
Firstly, I can configure the SW1 to set RT1051 to boot up from the SD card, and it's able to make the RT1051 enter Serial Download mode via configuring the SW1 too.

jeremyzhou_0-1644224354665.png

Next, the NXP-MCUBootUtility can build communication with the board, however, it encounters a program fail issue (just as the below figure shows) when NXP-MCUBootUtility programs an image to the eMMC.

jeremyzhou_1-1644224390203.png

According to your previous, you can program an image to the eMMC successfully by using the NXP-MCUBootUtility, did you encounter a similar issue during the testing?
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
5,681 Views
ramreddy
Contributor III

Hi,

Thanks for replying.

Some times we will get that kind of error result but some times we are able to flash the eMMC successfully. Then after we had done readback of the eMMC and verified the data starting points, those are looking perfect. But we are unable to boot from the eMMC.

 

Also I had shared readback file earlier on your request.

 

Thanks,

Ramreddy.

0 Kudos
5,666 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
After several rounds of testing, I still encounter the below program fail issue no matter using the UART or USB port.

jeremyzhou_0-1644398933467.png

Further, I was wondering if you can share the evkbimxrt1050_mmccard_freertos example project that modifies thefsl_mmc.c and fsl_mmc.h, as I want to verify the hardware circuit is good.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
5,662 Views
ramreddy
Contributor III

Hi,

Thanks for replying.

I had attached example project with some modifications in the respective files fsl_mmc.c, uSDHC 2 channel pin configuration and sdmmc_config.h .

I'm able to do read write operations on eMMC with the attached example source code.

 

Thankls,

Ramreddy.

0 Kudos
5,648 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply and I'll tes it soon later.
Furthermore, I was wondering if you can list the modification you did in detail, as I don't want to miss any details.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
5,641 Views
ramreddy
Contributor III

Hi,

I had

1. added eMMC connected uSDHC2 channel in sdmmc_config.h file. The below changes are done to select the eMMC.

ramreddy_1-1644486873458.png

 

2. Enabled uSDHC2 channel in peripheral configuration section. The below pins I had configured for eMMC.

ramreddy_0-1644486640994.png

 

3. Modified mmccard_init(mmc_card_t *card) function for handling the EXT_CSD issue in the file fsl_mmc.c. I had shared the source code with you already kindly refer the respective function.

 

Thanks,

Ramreddy.

0 Kudos
5,601 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply and sharing.
Actually, I don't replicate the issue of reading the Extended CSD register during eMMC initialization, in another word, it doesn't need to adapt the mmccard_init(mmc_card_t *card) function to access the eMMC.
Next week, I'll contact the AE team about the issue and hope they provide some insights into the issue.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
5,596 Views
ramreddy
Contributor III

Hi,

Thanks for replying.

Extended CSD is having 512 bytes of data registers and having lot of dependency with accessing the eMMC further.

 

Thanks,

Ramreddy.

0 Kudos
5,712 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Sorry for reply late, as Chinese New Year holidays has not ended.
Thanks for your attachment and I'll inform you my the latest test result after the I go back to office at Feb 7th.
Thanks for your understand.

BR,

Jeremy

0 Kudos
6,365 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I think I need more information prior to figuring the issue out, so I was wondering if you provide the log of NXP-MCUBootUtility, further, I'd like to suggest you upload the read-back data.

Looking forward to your reply.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
6,358 Views
ramreddy
Contributor III

Hi jeremyzhou,

Thank you for the quick response.

I had attached read file of NXP-MCUBootUtility tool.

Tags (3)
0 Kudos
6,349 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
I think you forget to provide the work log of NXP-MCUBootUtility.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
6,333 Views
ramreddy
Contributor III

Hi,

 

Kindly the requested files in the attachment.

Since out last mail we tried the following operation:

Boot_mode[0] - Low
Boot_mode[1] - High

Boot config[1] - High
Boot_config[6] - Low
Boot_config[7] - High
Boot_config[9] - Low

After making the above changes, we are able to get the clock, command and we are observed some data fetching on data 0 ,data 1, data 2, data 3 signals from the i.MXRT1052.
However emmc still fails to respond and the device failed to boot from EMMC.

 

 

0 Kudos
6,288 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thanks for your reply.
Firstly, I'd like to suggest you follow the steps illustrated in 3.5. MFG boot from SD Card in the AN12107, except for Step 8. Please use the below command for Step 8.
elftosb.exe -f kinetis -V -c ../../bd_file/imx10xx/program_mmccard_image_fastboot.bd -o boot_image.sb ivt_itcm_hello_world_nopadding.bin
After generating the sb file and program it to eMMC, then set the BOOT_CFG pins as the below.

BOOT_CFG1[0] 1
BOOT_CFG1[1] 1
BOOT_CFG1[2] 0
BOOT_CFG1[3] 0
BOOT_CFG1[4] 1
BOOT_CFG1[5] 1
BOOT_CFG1[6] 0
BOOT_CFG1[7] 1
BOOT_CFG2[0] 0
BOOT_CFG2[1] 1
BOOT_CFG2[2] 1


Meanwhile, set the Boot_Mode[1:0] = 10.

Please give it a try.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
6,278 Views
ramreddy
Contributor III

Hi,

We are using MCU expresso IDE in this we are able to generate .s19 binary only.

we are unable to find .icf file in Step 3.

any way we had tried with the .s19 file. we are able to generate the required files in the step 7.

ramreddy_0-1640601190333.png

while executing the Step 8 we are getting the error like below

D:\Projects\tools\Flashloader_RT1050_1.1\Tools\elftosb\win>elftosb.exe -f imx -V -c ../../bd_file/imx10xx/program_mmccard_image_fastboot.bd -o boot_image.sb ivt_itcm_hello_world_nopadding.bin
error: line 41: invalid source name 'myUserDataFile'

 

 

Also, we had tried with example .srec file given in the example section in flash loader. We got the below response.

ramreddy_2-1640602306193.png

 

D:\Projects\tools\Flashloader_RT1050_1.1\Tools\elftosb\win>elftosb.exe -f imx -V -c ../../bd_file/imx10xx/imx-itcm-unsigned.bd -o ivt_itcm_hello_world.bin led_demo_evk_ram_0xa000.srec
Section: 0x0
iMX bootable image generated successfully

D:\Projects\tools\Flashloader_RT1050_1.1\Tools\elftosb\win>elftosb.exe -f kinetis -V -c ../../bd_file/imx10xx/program_mmccard_image_fastboot.bd -o boot_image.sb ivt_itcm_hello_world_nopadding.bin
error: line 41: invalid source name 'myUserDataFile'

D:\Projects\tools\Flashloader_RT1050_1.1\Tools\elftosb\win>

 

can you please suggest if anything else we need to do.

 

0 Kudos
6,271 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I've attached an S19 file and two bd files, you can follow the below steps to generate the SB file, then use the MfgTool to download it.
1) elftosb.exe -f imx -V -c imx-itcm-unsigned.bd -o evkbimxrt1050_hello_world.bin evkbimxrt1050_hello_world.s19
2) elftosb.exe -f kinetis -V -c program_mmccard_image_fastboot.bd -o boot_image.sb evkbimxrt1050_hello_world_nopadding.bin

The demo will print a string “i.MXRT1050 BOOT from eMMC” if boot-up successfully.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos