From a2ace698edc44271d8cdcb26e9aee8d957ecda4d Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 16 Jan 2017 01:19:14 +0800 Subject: [PATCH] sdmmc: fix explanation of flash voltage regulator configuration efuses - low level on GPIO12 corresponds to 3.3V output, not 1.8V - add espefuse.py commands to burn efuses - add XPD_SDIO_REG to the list of efuses which must be set Reported on the forum: http://esp32.com/viewtopic.php?f=2&t=849&start=10#p4170 --- examples/27_sd_card/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/examples/27_sd_card/README.md b/examples/27_sd_card/README.md index 4053ad26092a..bfc6a39fe973 100644 --- a/examples/27_sd_card/README.md +++ b/examples/27_sd_card/README.md @@ -40,9 +40,20 @@ GPIO12 is used as a bootstrapping pin to select output voltage of an internal re - For boards which don't use the internal regulator, GPIO12 can be pulled high. - On boards which use the internal regulator and a 3.3V flash chip, GPIO12 should be pulled up high, which is compatible with SD card operation. -- For boards which use 1.8V flash chip, GPIO12 needs to be low at reset. +- For boards which use 3.3V flash chip, GPIO12 needs to be low at reset. * In this case, internal pullup can be enabled using a `gpio_pullup_en(GPIO_NUM_12);` call. Most SD cards work fine when an internal pullup on GPIO12 line is enabled. Note that if ESP32 experiences a power-on reset while the SD card is sending data, high level on GPIO12 can be latched into the bootstrapping register, and ESP32 will enter a boot loop until external reset with correct GPIO12 level is applied. - * Another option is to program flash voltage selection efuses: set `SDIO_TIEH=0` and `SDIO_FORCE=1`. This will permanently select 1.8v output voltage for the internal regulator, and GPIO12 will not be used as a bootstrapping pin anymore. Then it is safe to connect a pullup resistor to GPIO12. This option is suggested for production use. + * Another option is to program flash voltage selection efuses: set `XPD_SDIO_TIEH=1`, `XPD_SDIO_FORCE=1`, and `XPD_SDIO_REG = 1`. This will permanently select 3.3V output voltage for the internal regulator, and GPIO12 will not be used as a bootstrapping pin anymore. Then it is safe to connect a pullup resistor to GPIO12. This option is suggested for production use. + +The following commands can be used to program flash voltage selection efuses **to 3.3V**: + +```sh + # Override flash regulator configuration using efuses + components/esptool_py/esptool/espefuse.py burn_efuse XPD_SDIO_FORCE + # Select 3.3V output voltage + components/esptool_py/esptool/espefuse.py burn_efuse XPD_SDIO_TIEH + # Enable internal voltage regulator + components/esptool_py/esptool/espefuse.py burn_efuse XPD_SDIO_REG +``` ## 4-line and 1-line modes