Skip to contentSkip to conversation

MMC write failed - Can't read partition table

U-Boot DaveKucharczyk 1 participant 1 message Nov 8, 2016

lore
Share & tools
lore
#0 lore raw

Hi, we've been using a new SD card for 6+ months without issues, but recently noticed issues with newer releases. I'm not sure if it's the SD cards, our burner stations or our build process. Were using U-Boot 2014.07

The problem is that we can't read/write to the SD card during boot. This happens intermittently on freshly burned cards. 75% of the time it works.

Our bootcmd starts with ext2load mmc ... but obviously it fails due to "can't read partition table".

Manually debugging in U-Boot if I run mmc rescan then it can read the partition table, but if I reboot the system then the issue comes back upon next power-up.

If I run rescan AND then saveenv then everything works after that.

My questions are:

1. Is it good practice to run mmc rescan as one of the first things in bootcmd?

2. I'm a little confised as to why saveenv would cause the SD card to work again *persistently*.

3. Any recommendations on getting root cause as to what it could be (SD card, our burner stations or our build process)?

Troubleshooting steps below...

MX51 U-Boot > mmc info
Device: FSL_SDHC
Manufacturer ID: 87
OEM: 494f
Name: 004GB
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.8 GiB
Bus Width: 1-bit
MX51 U-Boot > mmc part

Partition Map for MMC device 0 -- Partition Type: DOS

Part Start Sector Num Sectors UUID Type
** Can't read partition table on 0:0 **
MX51 U-Boot > mmc rescan
MX51 U-Boot > mmc part

Partition Map for MMC device 0 -- Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     31000           3844000         00000000-01     83
  2     3882750         4037750         00000000-02     83

MX51 U-Boot > saveenv
Saving Environment to MMC...

reboot and everything works.

--
View this message in context: http://u-boot.10912.n7.nabble.com/MMC-write-failed-Can-t-read-partition-table-tp272634.html
Sent from the U-Boot mailing list archive at Nabble.com.