I am trying to boot form SD card in a custom board based on RT1170 chip but I can't do so!
I can program the SD card and read from it while connected to the chip using Secure Provisioning Tool and MCUBootUtility, the the chip never boot.
I followed steps here to program the SD card correctly using STP and MCUBootUtility.
- I linked my application to RAM and verified it works.
- I generated boot image in (STP/MCUB) with application in 0x1000 offset.
- I flashed the application using (STP/MCUB).
- Set
[boot mode = internal]
[BOOT_CFG1[6] = 1] to get BOOT_CFG1[7:6] = 0b01 or SD/eSD/SDXC boot from the
USDHC interface
but the application doesn't run
I verify the application status by monitoring serial UART printing of the chip.
How to debug boot failure?
NOTE: I also tried to generate boot image from (s19) file in MCUBootUtility
Solved! Go to Solution.
I fixed the issue, it happened due to error from NXP them selves.
SD Card pattern is wrong, instead of setting 7th switch ON, the 8th switch should be ON.
Couldn't figure it out directly, some tries and errors fixed the issue.
BTW, I checked it in the Reference Manual, it is also wrong, this pattern should be for eMMC/MMC devices, not SD Card.
All this depends on how numbers in the reference manual are interpreted.
Here BOOT_CFG1[7:6] = 01, so I assumed BOOT_CFG1[7]=0 and BOOT_CFG1[6]=1
why did I assumed this?
Because it is consistent with this table:
Where Serial Downloader mode is actually BOOT_MODE[1:0]=01
The correct order for this is (it is verified):
BOOT_MODE[0]=1
BOOT_MODE[1]=0
Device enter Serial Downloader mode when switch 4 is ON and 3 is OFF
Due to this inconsistency in the Reference Manual I couldn't boot from SD Card, and the maker of the MIMXRT1170-EVKB made a mistake in setting the boot mode switches.
Now I have SD Card working on both boards, mine and EVKB
Hope you fix this in coming versions
I fixed the issue, it happened due to error from NXP them selves.
SD Card pattern is wrong, instead of setting 7th switch ON, the 8th switch should be ON.
Couldn't figure it out directly, some tries and errors fixed the issue.
BTW, I checked it in the Reference Manual, it is also wrong, this pattern should be for eMMC/MMC devices, not SD Card.
All this depends on how numbers in the reference manual are interpreted.
Here BOOT_CFG1[7:6] = 01, so I assumed BOOT_CFG1[7]=0 and BOOT_CFG1[6]=1
why did I assumed this?
Because it is consistent with this table:
Where Serial Downloader mode is actually BOOT_MODE[1:0]=01
The correct order for this is (it is verified):
BOOT_MODE[0]=1
BOOT_MODE[1]=0
Device enter Serial Downloader mode when switch 4 is ON and 3 is OFF
Due to this inconsistency in the Reference Manual I couldn't boot from SD Card, and the maker of the MIMXRT1170-EVKB made a mistake in setting the boot mode switches.
Now I have SD Card working on both boards, mine and EVKB
Hope you fix this in coming versions
I double checked with RT1170-EVKB about SD Card boot configuration, the description is correct both RM and schematic diagram, comments as below, please correct me if my undertsanding is wrong.
1. Schematic diagram:
The 7th switch of SW2 = CFG[6] = 1
The 6th switch of SW2 = CFG[5] = 0
2. RM, 'Table 10-9, Boot device selection, page 283'. 'Table 10-28, page 314. ' Schematic diagram Boot configuration.
Hi @Sam_Gao ,
Your understanding for both the schematic and RM is correct, and that is the problem.
These configurations you have just mentioned in your comment won't run SD card.
Instead you have to use eMMC configurations :
BOOT_CFG[7] = 1
BOOT_CFG[6] = 0
These configurations only will run the SD card
So what I am saying is there is a mistake in the RM, which lead to a mistake in the MIMXRT1170-EVKB
You mean that you use eMMC configuration(BOOT_CFG[7] = 1, BOOT_CFG[6] = 0
) to boot SD card? That seems be impossbile.
If you use RT1170-EVKB and SD card(Default is supported) to boot, it should be 'BOOT_CFG[6] = 1, BOOT_CFG[5] = 0
',
it means: 7th switch of SW2 = CFG[6] = 1, 6th switch of SW2 = CFG[5] = 0
We double checked both from SW/HW, let me clairfy details here to help understand.
There are various types of SD cards on the market(e.g, Sandisk, Samsung), some support 4 lines, some support 1 line. Because eMMC is compatible with some SD protocols, it will cause the boot from the SD card to become the boot from the compatible eMMC. So, please check the following steps:
Force the use of SD card 4-wire mode (BOOT_CFG[9] = 1
) which should be supported by most SD cards. Then, if configured correctly as documented (BOOT_CFG[6] = 1, BOOT_CFG[5] = 0
) , booting from the SD card will succeed.
Please tell me if this issue is fixed.
Surprisingly, I don't see any difference on the schematic and Ref.Manual, But it works when SW8 is turned on instead of SW7 as you said
Following the given post didn't help me run SD card on MIMXRT1170-EVKB board, I followed the same steps for an example project from SDK library (iled_blinky_cm7), I verified that application is working using debug interface after linking it to RAM (internal RAM). but it doesn't boot of SD card !!!
Hi @abady1000
It is hard to give comments about the root cause about the fauilure of booting from SD card base on a custom board, it is out of our scope actually.
Please check if the issue is still happened even base on NXP EVK board, if it works well, you need to check hardware on the custom board.
Here is a post about boot SD casd on RT1050 EVK board for your reference.
B.R,
Sam
Hi,
i.MX RT1170 EVKB is our offcial develop board which supports MCUXpresso SDK as well.
If you want to boot from SD Card, plesae follow below steps which based on our i.MX RT1170 EVKB board (No any hardware issues).
1. Verify SD card
It works well if running evkmimxrt1170\sdmmc_examples\sdcard_polling example.
2. Refer to this post but it is with minor changes applicable to i.MX RT 1170.
3. Useful AN: How to Enable Non-XIP Boot on i.MX RT Series EVK Board
Thank you for your response...
1. The SD card work, I can read it, write it on the NXP and on the PC
I run the application you suggested and it works perfectly.
Here is the output:
One thing I notice is that it works on 1.8V, does this require special actions?
2. I have already followed this tutorial before posting, that problem is that it uses a tool called "Flashloader_i.MX1050" and I couldn't find it any way, how to get this tool?
3. I will check the Application Note.
Hi,
One more thing I need to give comments, this post involves some outdated tools or documents, such as flashloader, MFG,etc.
1. Flashloader: https://www.nxp.com/search?keyword=Flashloader&start=0
2. 'it works on 1.8V, does this require special actions?'
Please clarify what it is.
Thank you @Sam_Gao
1. Regarding the Flashloader tool you didn't send a link for the tool but for a search results, which I have already did in order to find Flashloader for RT1170 MCU, but there were none.
I guess the tutorial is outdated since the tools in it are no longer available for newer MCUs, and AN12238 clearly states that tools use is not interchangeable
Is there any updates regarding this?
2. I mean if SD card works on 1.8V or 3.3V, does this require any modifications to the GPIO BOOT pins or fuse register to make it work fine? or it should work fine regardless the voltage level?