I'm attempting to use the SD card interface functionality of the ESP32 module as part of a project. I'd like to be able to read at as high a speed as possible. Using 4 bit SDIO interface on SDMMC_HOST_SLOT_1 I can read raw sectors from various micro SD cards at up to about 9MB/s. However interestingly every card I've tried has been in default speed mode (25MHz max clock).
I have tried both my own code, the sd_card example and the sdmmc test app. I have made sure to uncomment the following line in the examples:
Code: Select all
// To allow capable cards to use high speed (40MHz) mode use the following flag
host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
The hardware is using a micro SD -> SD card adaptor connected to the ESP32 dev board C on bread board. the CMD,CLK and DAT lines have 10k pull ups and 33R series resistors (having some issues with signal integrity due to the bread-boarding). There is also a 10pF cap on the clock line (to GND) for similar issues. The card is decoupled with 10uF. This setup works reliably with both RAW read/write and FAT filesystems at deafult speed.
Looking at the CSD response the TRAN_SPEED field as accessed by SD_CSD_SPEED(response); in the sdmmc_decode_csd() function called as part of sdmmc_card_init() always gives a TRAN_SPEED of 0x32 (25Mb/s).
I was under the impression that I'd be able to access a UHS-1 card in high speed mode, is this incorrect? Has anyone had any luck in accessing a (micro) SD card in high speed mode?
Thanks,
Phil