Hi everyone,
I was experiencing I/O errors with SD cards on a Luckfox Pico B. The cards were detected by the system, but any read/write attempt failed:
[ 0.137225] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 0.149840] input: adc-keys as /devices/platform/adc-keys/input/input0
[ 0.186066] mmc_host mmc1: Bus speed (slot 0) = 24750000Hz (slot req 25000000Hz, actual 24750000HZ div = 0)
[ 0.186244] mmc1: new high speed SDHC card at address 0001
[ 0.187197] mmcblk1: mmc1:0001 7.50 GiB
[ 0.203108] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 0.235046] ubi0: attaching mtd6
[ 0.255613] mmc_host mmc1: Bus speed (slot 0) = 24750000Hz (slot req 25000000Hz, actual 24750000HZ div = 0)
[ 0.255986] blk_update_request: I/O error, dev mmcblk1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 0.256226] blk_update_request: I/O error, dev mmcblk1, sector 1 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 0.256511] blk_update_request: I/O error, dev mmcblk1, sector 2 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
I tried multiple SD cards (2 GB to 32 GB), lowered the bus frequency to 25 MHz, and initially used a 4-bit bus width, but the errors persisted.
After changing the SD/MMC bus width to 1-bit in the Device Tree, the SD cards were fully detected and started working correctly:
[ 0.137166] mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 0.149779] input: adc-keys as /devices/platform/adc-keys/input/input0
[ 0.235357] ubi0: attaching mtd6
[ 0.270909] mmc_host mmc1: Bus speed (slot 0) = 24750000Hz (slot req 25000000Hz, actual 24750000HZ div = 0)
[ 0.270957] mmc1: new high speed SDHC card at address 0007
[ 0.271623] mmcblk1: mmc1:0007 SD32G 14.4 GiB
[ 0.274705] mmcblk1: p1
No I/O errors appear anymore, and the cards can be mounted and used normally. It seems the root cause was bus width incompatibility rather than the cards themselves or the bus frequency.
Has anyone else run into similar issues with SD bus width on Pico B boards? Any recommendations for 4-bit mode stability would also be appreciated.
SD Card Fully Works After Changing Bus Width on Luckfox Pico B
Hello, from your log, it can be seen that the capacity of the SD card has been successfully read, indicating that the CMD pin is functioning normally. When setting the bus-width to 1, it can properly identify and mount the partition, which means that the DAT0 pin and CLK pin are also in good condition. Therefore, the problem should be that one of the DAT1 to DAT3 pins is not properly connected or damaged.
During our factory testing, there is a SD card testing process. On the Luckfox Pico, it can drive a bus-width 4 SD card.
During our factory testing, there is a SD card testing process. On the Luckfox Pico, it can drive a bus-width 4 SD card.

