Code: Select all
E (26231) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0x107
E (26239) diskio_sdmmc: sdmmc_read_blocks failed (263)
Code: Select all
spi_bus = {
.mosi_io_num = SPI_PIN_NUM_MOSI,
.miso_io_num = SPI_PIN_NUM_MISO,
.sclk_io_num = SPI_PIN_NUM_CLK,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = 4000,
};
esp_err_t ret = spi_bus_initialize(HSPI_HOST, &spi_bus, 1);
Code: Select all
// Configure SPI device for the Cmod A7
spi_cmod.address_bits = 0;
spi_cmod.command_bits = 1 * 8;
spi_cmod.dummy_bits = 0;
spi_cmod.mode = 0;
spi_cmod.duty_cycle_pos = 0;
spi_cmod.cs_ena_posttrans = 0;
spi_cmod.cs_ena_pretrans = 0;
spi_cmod.clock_speed_hz = SPI_SPEED_MHZ * 1000 * 1000;
spi_cmod.spics_io_num = SPI_PIN_NUM_CS_CMOD;
spi_cmod.flags = SPI_DEVICE_HALFDUPLEX;
spi_cmod.queue_size = 1;
spi_cmod.pre_cb = NULL;
spi_cmod.post_cb = NULL;
ret = spi_bus_add_device(HSPI_HOST, &spi_cmod, &spi_cmod_h);
Code: Select all
sdmmc_host_t host = SDSPI_HOST_DEFAULT();
host.max_freq_khz = SDMMC_FREQ_PROBING;
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
slot_config.gpio_cs = SPI_CS;
slot_config.host_id = HSPI_HOST;
esp_err_t ret = VFS::esp_vfs_fat_sdspi_mount(mount, &host, &slot_config, &mount_config, &card);
Well, I'm at the end of my wits. Hopefully someone can point me in the right direction. I've attached the log as well.
TIA,
AP