Skip to content

Make 1bit SDMMC interface work #4020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2020
Merged

Make 1bit SDMMC interface work #4020

merged 1 commit into from
May 22, 2020

Conversation

cyberman54
Copy link
Contributor

According to ESP-IDF API
https://github.com/espressif/esp-idf/blob/dc14d027cec49260b78efb1c3724b1710f2f3ec0/docs/en/api-reference/peripherals/sdmmc_host.rst :

"To configure the bus width, set the width field of :cpp:class:sdmmc_slot_config_t. For example, to set 1-line mode:

sdmmc_slot_config_t slot = SDMMC_SLOT_CONFIG_DEFAULT();
slot.width = 1;
"

E.g. necessary on Olimex ESP32-POE, because this board is using GPIO12 for other purpose (switching PoE power). GPIO12 ususally is used in 4 bit SDMMC interface. Thus, should be disabled in 1bit mode to avoid conflicts if GPIO12 is used for other purpose.

According to ESP-IDF API
https://github.com/espressif/esp-idf/blob/dc14d027cec49260b78efb1c3724b1710f2f3ec0/docs/en/api-reference/peripherals/sdmmc_host.rst :

"To configure the bus width, set the width field of :cpp:class:`sdmmc_slot_config_t`. For example, to set 1-line mode:

sdmmc_slot_config_t slot = SDMMC_SLOT_CONFIG_DEFAULT();
slot.width = 1;
"
@DanKoloff
Copy link
Contributor

@DanKoloff
Copy link
Contributor

One of our employees tried to do it here:

#3903

@me-no-dev
Copy link
Member

take a look here :) https://github.com/espressif/arduino-esp32/blob/master/variants/esp32-evb/pins_arduino.h#L31 this is olimex EVB. Also 1bit SDMMC

@DanKoloff
Copy link
Contributor

take a look here :) https://github.com/espressif/arduino-esp32/blob/master/variants/esp32-evb/pins_arduino.h#L31 this is olimex EVB. Also 1bit SDMMC

I believe that the issue is not properly and clearly explained in the post. I believe that the issue is:

  • The pins used for 4-bit mode are not freed to use WHEN and IF you decide to set the 1-bit mode. Meaning that 1-bit mode works but the rest of the pins are still not free to use.

@me-no-dev
Copy link
Member

@DanKoloff killing me with this nickname :D alright, clear! Merging..

@me-no-dev me-no-dev merged commit 594ee6d into espressif:master May 22, 2020
@DanKoloff
Copy link
Contributor

@cyberman54 Thanks for the contribution

vvhh2002 pushed a commit to vvhh2002/arduino-esp32 that referenced this pull request Jun 15, 2020
* master:
  M5Stack's product offering includes various ESP32-based camera devices. (espressif#4030)
  Fix for issue 3974 m_connectedCount incorrectly decremented when no connection exists
  Add a new board of KITS for IoT education (espressif#3703)
  update M5Camera pins (espressif#4021)
  Update SD_MMC.cpp (espressif#4020)
  Added missing wifi_provisioning dependency. (espressif#4003)
  HardwareSerial bugfix & improvement (espressif#3713)
  Allow using custom linker scripts (espressif#3735)
  Add M5Stack-ATOM Board (espressif#3883)
  Minor modifications in provisioning (espressif#3919)
  Add support of unified provisioning to Arduino
  Update install-platformio-esp32.sh
  add new board Handbit  (espressif#3807)
  Move _STREAM_BOUNDARY before _STREAM_PART (espressif#3720)
  Add Senses's WEIZEN board from Senses IoT platform (espressif#3687)
  Revert "std::shared_ptr Memory Leak (espressif#3680)" (espressif#3682)
  std::shared_ptr Memory Leak (espressif#3680)
  Minimize HardwareSerial Receive and Transmit delays (espressif#3664)
  fix removeApbChangeCallback() error in spiStopBus() (espressif#3675)

# Conflicts:
#	CMakeLists.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants