SD card boot on i.MX8M Mini only works first time after insert

cancel
Showing results for 
Search instead for 
Did you mean: 

SD card boot on i.MX8M Mini only works first time after insert

Jump to solution
173 Views
Hongwei
Contributor I

SD card boot on i.MX8M Mini only works reliably with following specific steps:

1. remove sd card and don't set gpio for sd card boot
2. boot from emmc and stop auto boot in uboot
3. insert sd card set gpio for sdcard boot
4. execute 'reset' command in uboot
5. board then boots up kernel from sd card with no issue

After step 5, if kernel is reboot(by command), board can boot uboot from sd card, but then ubboot can't start kernel - it fails to load kernel image(size is 18M) from sdcard - more specifically, fails at last reading command of the sdhc driver due to irq state returns DATA_ERR. And subsequent uboot command reset would have the same issue. To fix, the afore mentioned steps have to be executed again.

And in addition, as long as gpio is set to sdcard boot, hard reset by pressing the reset button mostly can't boot from sdcard - console to uart doesn't output anything after resetting. After resetting, if I then try to flash board by using uuu, flashing would success which may implies that board is in serial downloading mode. After resetting, if I keep pressing reset button,  1 out of 10, board may boot from sd card without issue.

So my questions are:
1. any possible cause of this sd boot issue?
2. any suggestion on how to debug this issue?
3. Are "micro SDHC HC I class10" and "micro SDXC I UHS speed class 1" sd cards suitable for sd boot?(IMX8MMRM says boot code supports "SDv2.0 or less; SDXCv3.0", but not quite sure the mapping between version and the card model)

Thanks,

Hongwei

Labels (1)
0 Kudos
1 Solution
123 Views
Hongwei
Contributor I

Thanks for the reply, the issue turns out to be a reset sequencing problem.

View solution in original post

0 Kudos
2 Replies
124 Views
Hongwei
Contributor I

Thanks for the reply, the issue turns out to be a reset sequencing problem.

View solution in original post

0 Kudos
150 Views
b45499
NXP TechSupport
NXP TechSupport

How is your design different from our reference board? Which version BSP work on your side?

0 Kudos