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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,348 次查看
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

标签 (1)
0 项奖励
回复
1 解答
1,298 次查看
Hongwei
Contributor I

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,299 次查看
Hongwei
Contributor I

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

0 项奖励
回复
1,325 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复