Floating data pins for sdmmc

jgrossholtz
Posts: 1
Joined: Thu Feb 29, 2024 11:27 am

Floating data pins for sdmmc

Postby jgrossholtz » Thu Feb 29, 2024 2:42 pm

Hello all,

We are using an ESP32-S3 (ESP32-S3-WROOM-1-N16R2) for a product development. It requires an eMMC, for various reasons we decided to connect this eMMC via a level shifter (FXLA108BQX) to the ESP32-S3. We also decided to use 4 data signals.

Image
It is connected to the ESP32 using IO 13,14,21,47 and IO45 and 48 for CMD and CLK :
Image

The FXLA108BQX takes care internally of the required PULLs up for the data signals, but requires data lines to be floating on the input side (signals from the micro).

The issue is that once the sdmmc communication is configured the data pins are marked as pulled up:
[...]
I (409) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (418) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (428) gpio: GPIO[47]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (437) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (516) gpio: GPIO[13]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
[...]


On the software side I use esp_vfs_fat_sdmmc_mount, but it is the same behavior with sdmmc_host_init and sdmmc_host_init_slot. sdmmc_card_t *card = NULL;
const char mount_point[] = MOUNT_POINT;
esp_err_t ret;

esp_vfs_fat_sdmmc_mount_config_t mount_config = {
.format_if_mount_failed = true,
.max_files = 5,
.allocation_unit_size = 16 * 1024
};
ESP_LOGI(TAG, "Initializing eMMC");

sdmmc_host_t host = SDMMC_HOST_DEFAULT();
host.slot = SDMMC_HOST_SLOT_0;
host.max_freq_khz = 10000;// SDMMC_FREQ_DEFAULT;
//host.flags &= ~SDMMC_HOST_FLAG_DDR;

sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
slot_config.width = 4;
slot_config.clk = BSP_SD_CLK;
slot_config.cmd = BSP_SD_CMD;
slot_config.d0 = BSP_SD_D0;
slot_config.d1 = BSP_SD_D1;
slot_config.d2 = BSP_SD_D2;
slot_config.d3 = BSP_SD_D3;
slot_config.flags &= ~SDMMC_SLOT_FLAG_INTERNAL_PULLUP;

ESP_LOGI(TAG, "Mounting filesystem");
ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
if (ret != ESP_OK) {
if (ret == ESP_FAIL) {
ESP_LOGE(TAG, "Failed to mount filesystem. ");
} else {
ESP_LOGE(TAG, "Failed to initialize the eMMC (%s). "
"Make sure eMMC lines have pull-up resistors in place.", esp_err_to_name(ret));
}
return;
}
ESP_LOGI(TAG, "Filesystem mounted");

// Card has been initialized, print its properties
sdmmc_card_print_info(stdout, card);
[/Codebox]

Is there a way to force the sdmmc driver to set the pins as floating ?
The SDMMC_SLOT_FLAG_INTERNAL_PULLUP does not seems to have any effect.
I have to limit the communication speed because of this (I guess).

Thanks !
Attachments
Pasted image 1.png
Pasted image 1.png (13.85 KiB) Viewed 624 times
Pasted image.png
Pasted image.png (52.27 KiB) Viewed 624 times

MicroController
Posts: 1707
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Floating data pins for sdmmc

Postby MicroController » Thu Feb 29, 2024 10:41 pm

https://github.com/espressif/esp-idf/bl ... ost.c#L843
Looks like you should be able to manually disable the GPIO pull-ups after initialization of the sdmmc.

Who is online

Users browsing this forum: No registered users and 113 guests