mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-03 06:58:11 +00:00
Merge branch 'docs/translate_sd_pullup_requirements' into 'master'
docs: Provide Chinese translation for sd_pullup_requirements Closes DOC-8133 See merge request espressif/esp-idf!31638
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
SD Pull-up Requirements
|
||||
=======================
|
||||
|
||||
:link_to_translation:`zh_CN:[中文]`
|
||||
|
||||
Espressif hardware products are designed for multiple use cases which may require different pull states on pins. For this reason, the pull state of particular pins on certain products needs to be adjusted to provide the pull-ups required in the SD bus.
|
||||
|
||||
SD pull-up requirements apply to cases where {IDF_TARGET_NAME} uses the SPI or SDMMC controller to communicate with SD cards. When an SD card is operating in SPI mode or 1-bit SD mode, the CMD and DATA (DAT0 - DAT3) lines of the SD bus must be pulled up by 10 kOhm resistors. SD cards and SDIO devices should also have pull-ups on all above-mentioned lines (regardless of whether these lines are connected to the host) in order to prevent them from entering a wrong state.
|
||||
SD pull-up requirements apply to cases where {IDF_TARGET_NAME} uses the SPI or SDMMC controller to communicate with SD cards. When an SD card is operating in SPI mode or 1-bit SD mode, the CMD and DATA (DAT0 - DAT3) lines of the SD bus must be pulled up by 10 kΩ resistors. SD cards and SDIO devices should also have pull-ups on all above-mentioned lines (regardless of whether these lines are connected to the host) in order to prevent them from entering a wrong state.
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
@@ -11,13 +13,13 @@ SD pull-up requirements apply to cases where {IDF_TARGET_NAME} uses the SPI or S
|
||||
|
||||
.. todo::
|
||||
|
||||
Add a diagram of the Bus lines and pullups
|
||||
Add a diagram of the bus lines and pullups
|
||||
|
||||
This document has the following structure:
|
||||
|
||||
- `Overview of compatibility`_ between the default pull states on pins of Espressif's products and the states required by the SD bus
|
||||
- `Solutions`_ - ideas on how to resolve compatibility issues
|
||||
- `Related information`_ - other relevant information
|
||||
- :ref:`compatibility_overview_espressif_hw_sdio` between the default pull states on pins of Espressif's products and the states required by the SD bus
|
||||
- :ref:`sdio_solutions` - ideas on how to resolve compatibility issues
|
||||
- :ref:`related_info_sdio` - other relevant information
|
||||
|
||||
|
||||
.. _compatibility_overview_espressif_hw_sdio:
|
||||
@@ -28,11 +30,11 @@ Overview of Compatibility
|
||||
This section provides an overview of compatibility issues that might occur when using SDIO (secure digital input output). Since the SD bus needs to be connected to pull-ups, these issues should be resolved regardless of whether they are related to master (host) or slave (device). Each issue has links to its respective solution. A solution for a host and device may differ.
|
||||
|
||||
|
||||
Systems on a Chip (SoCs)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
Systems on a Chip (SoCs)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ESP32 (except for D2WD versions, see `ESP32 datasheet <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_):
|
||||
|
||||
- :ref:`sd_pull-up_no_pull-ups`
|
||||
@@ -45,33 +47,34 @@ Systems on a Chip (SoCs)
|
||||
|
||||
.. only:: SOC_SDMMC_USE_GPIO_MATRIX
|
||||
|
||||
{IDF_TARGET_NAME} SDMMC host controller allows using any of GPIOs for any of SD interface signals. However, it is recommended to avoid using strapping GPIOs, GPIOs with internal weak pull-downs and GPIOs commonly used for other purposes to prevent conflicts:
|
||||
Systems on a Chip (SoCs)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. only:: esp32s3
|
||||
{IDF_TARGET_NAME} SDMMC host controller allows using any of GPIOs for any of SD interface signals. However, it is recommended to avoid using strapping GPIOs, GPIOs with internal weak pull-downs and GPIOs commonly used for other purposes to prevent conflicts.
|
||||
|
||||
- GPIO0 (strapping pin)
|
||||
- GPIO45, GPIO46 (strapping pins, internal weak pulldown)
|
||||
- GPIO26 - GPIO32 (commonly used for SPI Flash and PSRAM)
|
||||
- GPIO33 - GPIO37 (when using chips and modules with Octal SPI Flash or Octal PSRAM)
|
||||
- GPIO43, GPIO44 (GPIOs used for UART0 by default)
|
||||
- GPIO19, GPIO20 (GPIOs used for USB by default)
|
||||
.. only:: esp32s3
|
||||
|
||||
- GPIO0 (strapping pin)
|
||||
- GPIO45, GPIO46 (strapping pins, internal weak pulldown)
|
||||
- GPIO26 - GPIO32 (commonly used for SPI flash and PSRAM)
|
||||
- GPIO33 - GPIO37 (when using chips and modules with octal SPI flash or octal PSRAM)
|
||||
- GPIO43, GPIO44 (GPIOs used for UART0 by default)
|
||||
- GPIO19, GPIO20 (GPIOs used for USB by default)
|
||||
|
||||
Systems in Packages (SIP)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
Systems in Packages (SIP)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ESP32-PICO-D4:
|
||||
|
||||
- :ref:`sd_pull-up_no_pull-ups`
|
||||
- :ref:`strapping_conflicts_dat2`
|
||||
|
||||
|
||||
Modules
|
||||
^^^^^^^
|
||||
|
||||
.. only:: esp32
|
||||
Modules
|
||||
^^^^^^^
|
||||
|
||||
- ESP32-WROOM-32 Series, including ESP32-WROOM-32, ESP32-WROOM-32D, ESP32-WROOM-32U, and ESP32-SOLO-1
|
||||
|
||||
@@ -88,13 +91,13 @@ Modules
|
||||
- :ref:`strapping_conflicts_dat2`
|
||||
|
||||
|
||||
.. _sdio_dev_kits:
|
||||
|
||||
Development Boards
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
.. _sdio_dev_kits:
|
||||
|
||||
Development Boards
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ESP32-PICO-KIT, including PICO-KIT v4.1, v4.0, and v3
|
||||
|
||||
- :ref:`sd_pull-up_no_pull-ups`
|
||||
@@ -132,6 +135,11 @@ Development Boards
|
||||
|
||||
.. only:: esp32s3
|
||||
|
||||
.. _sdio_dev_kits:
|
||||
|
||||
Development Boards
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- ESP32-S3-DevKitC-1
|
||||
|
||||
- :ref:`sd_pull-up_no_pull-ups`
|
||||
@@ -154,6 +162,8 @@ Development Boards
|
||||
Please make sure that your SDIO host provides necessary pull-ups for all SD bus signals.
|
||||
|
||||
|
||||
.. _sdio_solutions:
|
||||
|
||||
Solutions
|
||||
---------
|
||||
|
||||
@@ -162,10 +172,19 @@ Solutions
|
||||
No Pull-ups
|
||||
^^^^^^^^^^^
|
||||
|
||||
If you use a development board without pull-ups, you can do the following:
|
||||
.. only:: esp32 or esp32s3
|
||||
|
||||
- If your host and slave device are on separate boards, replace one of them with a board that has pull-ups. For the list of Espressif's development boards with pull-ups, go to :ref:`sdio_dev_kits`.
|
||||
- Attach external pull-ups by connecting each pin which requires a pull-up to VDD via a 10 kOhm resistor.
|
||||
When using a development board without pull-ups:
|
||||
|
||||
- If your host and slave device are on separate boards, replace one of them with a board that has pull-ups. For the list of Espressif's development boards with pull-ups, go to :ref:`sdio_dev_kits`.
|
||||
- Attach external pull-ups by connecting each pin which requires a pull-up to VDD via a 10 kΩ resistor.
|
||||
|
||||
.. only:: not esp32 and not esp32s3
|
||||
|
||||
When using a development board without pull-ups:
|
||||
|
||||
- If your host and slave device are on separate boards, replace one of them with a board that has pull-ups.
|
||||
- Attach external pull-ups by connecting each pin which requires a pull-up to VDD via a 10 kΩ resistor.
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
@@ -180,7 +199,7 @@ If you use a development board without pull-ups, you can do the following:
|
||||
- Use SPI mode
|
||||
- Perform one of the following actions on the GPIO13 pin:
|
||||
- Remove the pull-down resistors
|
||||
- Attach a pull-up resistor of less than 5 kOhm (2 kOhm suggested)
|
||||
- Attach a pull-up resistor of less than 5 kΩ (2 kΩ suggested)
|
||||
- Pull it up or drive it high either by using the host or with 3.3 V on VDD in 1-bit SD mode
|
||||
|
||||
|
||||
@@ -219,20 +238,20 @@ If you use a development board without pull-ups, you can do the following:
|
||||
BURN
|
||||
VDD_SDIO setting complete.
|
||||
|
||||
To check the status of the eFuses, run::
|
||||
To check the status of the eFuses, run:
|
||||
|
||||
.. code-block::
|
||||
.. code-block:: none
|
||||
|
||||
idf.py efuse-summary
|
||||
|
||||
If running from an automated flashing script, it is better to use standalone eFuse tool, ``espefuse.py``. This tool also has an option ``--do-not-confirm`` to burn eFuses without confirmation.
|
||||
If running from an automated flashing script, it is better to use standalone eFuse tool ``espefuse.py``. This tool also has an option ``--do-not-confirm`` to burn eFuses without confirmation.
|
||||
|
||||
For more details, see **{IDF_TARGET_NAME} Technical Reference Manual** [`PDF <{IDF_TARGET_TRM_EN_URL}#efuse>`__].
|
||||
|
||||
2. **If using 1-bit SD mode or SPI mode**, disconnect the DAT2 pin and make sure it is pulled high. For this, do one the following:
|
||||
2. **If using 1-bit SD mode or SPI mode**, disconnect the DAT2 pin and make sure it is pulled high. For this, you have the following options:
|
||||
|
||||
- Leave the host's DAT2 floating and directly connect the slave's DAT2 to VDD.
|
||||
- For a slave device, build a firmware with the option ``SDIO_SLAVE_FLAG_DAT2_DISABLED`` and re-flash your device. This option helps avoid slave detecting on the DAT2 line. Note that 4-bit SD mode is no longer supported by the standard Card Common Control Register (CCCR); however, the host is not aware of that. The use of 4-bit SD mode has to be disabled on the host's side.
|
||||
- Leave the host's DAT2 floating and directly connect the slave's DAT2 to VDD.
|
||||
- For a slave device, build a firmware with the option ``SDIO_SLAVE_FLAG_DAT2_DISABLED`` and re-flash your device. This option helps avoid slave detecting on the DAT2 line. Note that 4-bit SD mode is no longer supported by the standard Card Common Control Register (CCCR); however, the host is not aware of that. The use of 4-bit SD mode has to be disabled on the host's side.
|
||||
|
||||
|
||||
.. _no_pull-up_on_gpio12:
|
||||
@@ -240,7 +259,7 @@ If you use a development board without pull-ups, you can do the following:
|
||||
No Pull-up on GPIO12
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Your module is compatible with the SDIO protocol. Just connect GPIO12 to VDD via a 10 kOhm resistor.
|
||||
Your module is compatible with the SDIO protocol. Just connect GPIO12 to VDD via a 10 kΩ resistor.
|
||||
|
||||
|
||||
.. _gpio2_strapping_pin:
|
||||
@@ -248,26 +267,26 @@ If you use a development board without pull-ups, you can do the following:
|
||||
Download Mode Not Working (minor issue)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
When the GPIO2 pin is pulled high in accordance with the SD pull-up requirements, you cannot enter Download mode because GPIO2 is a bootstrapping pin which in this case must be pulled low.
|
||||
When the GPIO2 pin is pulled high in accordance with the SD pull-up requirements, you can not enter download mode because GPIO2 is a bootstrapping pin which in this case must be pulled low.
|
||||
|
||||
There are the following solutions:
|
||||
There are following solutions:
|
||||
|
||||
- For boards that require shorting the GPIO0 and GPIO2 pins with a jumper, put the jumper in place, and the auto-reset circuit pulls GPIO2 low along with GPIO0 before entering Download mode.
|
||||
- For boards that require shorting the GPIO0 and GPIO2 pins with a jumper, put the jumper in place, and the auto-reset circuit pulls GPIO2 low along with GPIO0 before entering download mode.
|
||||
- For boards with components attached to their GPIO2 pin (such as pull-down resistors and/or LEDs), check the schematic of your development board for anything connected to GPIO2.
|
||||
|
||||
- **LEDs** would not affect operation in most cases.
|
||||
- **Pull-down resistors** can interfere with DAT0 signals and must be removed.
|
||||
|
||||
If the above solutions do not work for you, please determine if it is the host or slave device that has pull-ups affecting their GPIO2, then locate these pull-ups and remove them.
|
||||
If above solutions do not work for you, please determine if it is the host or slave device that has pull-ups affecting their GPIO2, then locate these pull-ups and remove them.
|
||||
|
||||
|
||||
.. _related_info_sdio:
|
||||
|
||||
Related Information
|
||||
-------------------
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
.. _related_info_sdio:
|
||||
|
||||
Related Information
|
||||
-------------------
|
||||
|
||||
.. _mtdi_strapping_pin:
|
||||
|
||||
MTDI Strapping Pin
|
||||
@@ -287,9 +306,9 @@ Related Information
|
||||
Internal Pull-ups and Strapping Requirements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Using external resistors is always preferable. However, Espressif's products have internal weak pull-up and pull-down resistors which can be enabled and used instead of external ones. Please keep in mind that this solution cannot guarantee reliable SDIO communication.
|
||||
Using external resistors is always preferable. However, Espressif's products have internal weak pull-up and pull-down resistors which can be enabled and used instead of external ones. Please keep in mind that this solution can not guarantee reliable SDIO communication.
|
||||
|
||||
With that said, the information about these internal pull-ups and strapping requirements can still be useful. Espressif hardware products have different weak internal pull-ups/pull-downs connected to CMD and DATA pins. The table below shows the default pull-up and pull-down states of the CMD and DATA pins.
|
||||
With that said, the information about these internal pull-ups and strapping requirements can still be useful. Espressif hardware products have different weak internal pull-ups and pull-downs connected to CMD and DATA pins. The table below shows the default pull-up and pull-down states of the CMD and DATA pins.
|
||||
|
||||
The following abbreviations are used in the table:
|
||||
|
||||
@@ -325,3 +344,17 @@ Related Information
|
||||
- DAT3
|
||||
- WPU
|
||||
-
|
||||
|
||||
.. only:: not esp32
|
||||
|
||||
.. _related_info_sdio:
|
||||
|
||||
Related Information
|
||||
-------------------
|
||||
|
||||
Internal Pull-ups and Strapping Requirements
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Using external resistors is always preferable. However, Espressif's products have internal weak pull-up and pull-down resistors which can be enabled and used instead of external ones. Please keep in mind that this solution can not guarantee reliable SDIO communication.
|
||||
|
||||
Generally it's not recommended to reuse strapping pins for SDIO purposes. The pullup and pulldown requirements of SD and strapping may conflict with each other. See datasheet for the strapping pins of {IDF_TARGET}.
|
||||
|
Reference in New Issue
Block a user