Track lengths for SD card data lines
Posted: Tue Nov 27, 2018 4:46 am
I'm having problems coming up with a working SD card design. I'm using the pins as the SD_MMC example:
DAT0 : IO2
DAT1 : IO4
DAT2 : IO12
DAT3 : IO13
CLK : IO14
CMD : IO15
And I have pull-up resistors in place for all the pins. But I can't get the SD card to mount with any of the example code in Arduino or ESP-IDF. The only problem I can think of is that the trace lengths are significantly different - differences of up to about 700 mils. Do the data and clock lines need to be similar lengths in order to work???
Any insight would be greatly appreciated!
p.s. - I tried using a slower max_freq in the host_config, but that didn't seem to have any effect.
pps - This is the error that I am getting:
rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7936
entry 0x40080310
E (1497) sdmmc_cmd: sdmmc_card_init: send_op_cond (1) returned 0x107
Card Mount Failed
0x107 https://www.esp32.com/viewtopic.php?t=2272#p10699 apparently means that the card did not respond to the CMD line, suggesting that D3 isn't pulled high - but it is.
DAT0 : IO2
DAT1 : IO4
DAT2 : IO12
DAT3 : IO13
CLK : IO14
CMD : IO15
And I have pull-up resistors in place for all the pins. But I can't get the SD card to mount with any of the example code in Arduino or ESP-IDF. The only problem I can think of is that the trace lengths are significantly different - differences of up to about 700 mils. Do the data and clock lines need to be similar lengths in order to work???
Any insight would be greatly appreciated!
p.s. - I tried using a slower max_freq in the host_config, but that didn't seem to have any effect.
pps - This is the error that I am getting:
rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7936
entry 0x40080310
E (1497) sdmmc_cmd: sdmmc_card_init: send_op_cond (1) returned 0x107
Card Mount Failed
0x107 https://www.esp32.com/viewtopic.php?t=2272#p10699 apparently means that the card did not respond to the CMD line, suggesting that D3 isn't pulled high - but it is.