Skip to content

Add default 10MHz SD card frequency for SD SPI #6225

Closed
@grantwilk

Description

@grantwilk

Related area

SD SPI

Hardware specification

ESP32

Is your feature request related to a problem?

By default, ESP-IDF does not provide a default 10MHz SDMMC speed, even though there is a note about it in sdmmc_common.c. This means that using SD SPI with SD cards that do not support the 20MHz default speed requires additional steps and code modification to initialize.

/* Find highest frequency in the following list,
     * which is below card->max_freq_khz.
     */
    const uint32_t freq_values[] = {
            SDMMC_FREQ_52M,
            SDMMC_FREQ_HIGHSPEED,
            SDMMC_FREQ_26M,
            SDMMC_FREQ_DEFAULT,
            //NOTE: in sdspi mode, 20MHz may not work. in that case, add 10MHz here.
    };

Describe the solution you'd like

Please add a default SDMMC_FREQ_10M definition to sdmmc_types.h and add it to freq_values in sdmmc_common.c.

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Activity

VojtechBartoska

VojtechBartoska commented on Feb 4, 2022

@VojtechBartoska
Contributor

Thanks for contributing @grantwilk. Can you please help with triage, @P-R-O-C-H-Y ?

P-R-O-C-H-Y

P-R-O-C-H-Y commented on Mar 23, 2022

@P-R-O-C-H-Y
Member

Hi @grantwilk,
This change needs to be made in ESP-IDF. I am in touch with them so once its available, I will let you know :)

self-assigned this
on Mar 23, 2022
moved this from Under investigation to In Progress in Arduino ESP32 Core Project Roadmapon May 4, 2022
moved this from In Progress to In Review in Arduino ESP32 Core Project Roadmapon Jul 25, 2022
VojtechBartoska

VojtechBartoska commented on Jul 26, 2022

@VojtechBartoska
Contributor

status update: This feature is now in Review in ESP-IDF.

igrr

igrr commented on Oct 1, 2022

@igrr
Member

The feature has been merged and is available on IDF master branch. Note that we don't plan to backport it to release/v4.4, so Arduino project can use it after upgrading to IDF v5.1 in the future.

added this to the 3.0.0 milestone on Oct 4, 2022

4 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @igrr@grantwilk@VojtechBartoska@P-R-O-C-H-Y

      Issue actions

        Add default 10MHz SD card frequency for SD SPI · Issue #6225 · espressif/arduino-esp32