I'm trying to save an image from the ESP-KORVO-2's camera to the MicroSD inserted in the camera slot. The problem is that the board seems not to recognise the SD, and I get the error:
vfs_fat_sdmmc: host init failed (0x105).
I know for a fact that both the SD and the reader work perfectly (I saved an audio file to the SD). Do you have any advice? Thanks in advance.
Below you can find the code I'm using.
Code: Select all
static esp_err_t initi_sd_card(void)
{
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
esp_vfs_fat_sdmmc_mount_config_t mount_config = {
.format_if_mount_failed = false,
.max_files = 3,
};
sdmmc_card_t *card;
esp_err_t err = esp_vfs_fat_sdmmc_mount("/sdcard", &host, &slot_config, &mount_config, &card);
if (err != ESP_OK)
{
return err;
}
return ESP_OK;
}