Merge branch 'bugfix/fixes_from_github' into 'master'

fixes for github issues

This MR includes commits from several Github PRs, as well some fixes for issues reported on Github and on the forum.

- compile PHY-related code only when WiFi is enabled
- fix macOS setup instructions
- fix some of the Sphinx warnings
- update docs index, improve structure of the readme-
- wifi: fix typos, rename ESP_ERR_WIFI_NOT_START to ESP_ERR_WIFI_NOT_STARTED
- sdmmc: fix explanation of flash voltage regulator configuration efuses
- sdmmc: change idx num of example
- fix i2c_get_period name
- fix esp_log_level_set function name in docs

See merge request !420
This commit is contained in:
Ivan Grokhotkov 2017-01-16 10:26:58 +08:00
commit 72da7aa53b
20 changed files with 106 additions and 90 deletions

View file

@ -1,32 +1,36 @@
# Using Espressif IoT Development Framework with the ESP32
# Espressif IoT Development Framework
[![alt text](https://readthedocs.org/projects/docs/badge/?version=latest "Documentation Status")](http://esp-idf.readthedocs.io/en/latest/?badge=latest)
# Setting Up ESP-IDF
ESP-IDF is the official development framework for the `ESP32 <https://espressif.com/en/products/hardware/esp32/overview>`_ chip.
In the [docs](docs) directory you will find per-platform setup guides:
# Developing With the ESP-IDF
* [Windows Setup Guide](docs/windows-setup.rst)
* [Mac OS Setup Guide](docs/macos-setup.rst)
* [Linux Setup Guide](docs/linux-setup.rst)
## Setting Up ESP-IDF
# Finding A Project
See setup guides for detailed instructions to set up the ESP-IDF:
As well as the [esp-idf-template](https://github.com/espressif/esp-idf-template) project mentioned in the setup guide, esp-idf comes with some example projects in the [examples](examples) directory.
* [Windows Setup Guide](http://esp-idf.readthedocs.io/en/latest/windows-setup.html)
* [Mac OS Setup Guide](http://esp-idf.readthedocs.io/en/latest/macos-setup.html)
* [Linux Setup Guide](http://esp-idf.readthedocs.io/en/latest/linux-setup.html)
Once you've found the project you want to work with, change to its directory and you can configure and build it:
## Finding a Project
# Configuring your project
As well as the [esp-idf-template](https://github.com/espressif/esp-idf-template) project mentioned in the setup guide, ESP-IDF comes with some example projects in the [examples](examples) directory.
Once you've found the project you want to work with, change to its directory and you can configure and build it.
## Configuring the Project
`make menuconfig`
# Compiling your project
## Compiling the Project
`make all`
... will compile app, bootloader and generate a partition table based on the config.
# Flashing your project
## Flashing the Project
When `make all` finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this from make by running:
@ -36,7 +40,7 @@ This will flash the entire project (app, bootloader and partition table) to a ne
You don't need to run `make all` before running `make flash`, `make flash` will automatically rebuild anything which needs it.
# Viewing Serial Output
## Viewing Serial Output
The `make monitor` target will use the already-installed [miniterm](http://pyserial.readthedocs.io/en/latest/tools.html#module-serial.tools.miniterm) (a part of pyserial) to display serial output from the ESP32 on the terminal console.
@ -46,7 +50,7 @@ To flash and monitor output in one pass, you can run:
`make flash monitor`
# Compiling & Flashing Just the App
## Compiling & Flashing Just the App
After the initial flash, you may just want to build and flash just your app, not the bootloader and partition table:
@ -57,9 +61,9 @@ After the initial flash, you may just want to build and flash just your app, not
(There's no downside to reflashing the bootloader and partition table each time, if they haven't changed.)
# Parallel Builds
## Parallel Builds
esp-idf supports compiling multiple files in parallel, so all of the above commands can be run as `make -jN` where `N` is the number of parallel make processes to run (generally N should be equal to or one more than the number of CPU cores in your system.)
ESP-IDF supports compiling multiple files in parallel, so all of the above commands can be run as `make -jN` where `N` is the number of parallel make processes to run (generally N should be equal to or one more than the number of CPU cores in your system.)
Multiple make functions can be combined into one. For example: to build the app & bootloader using 5 jobs in parallel, then flash everything, and then display serial output from the ESP32 run:
@ -67,7 +71,7 @@ Multiple make functions can be combined into one. For example: to build the app
make -j5 flash monitor
```
# The Partition Table
## The Partition Table
Once you've compiled your project, the "build" directory will contain a binary file with a name like "my_app.bin". This is an ESP32 image binary that can be loaded by the bootloader.
@ -84,7 +88,7 @@ In both cases the factory app is flashed at offset 0x10000. If you `make partiti
For more details about partition tables and how to create custom variations, view the `docs/partition-tables.rst` file.
# Erasing Flash
## Erasing Flash
The `make flash` target does not erase the entire flash contents. However it is sometimes useful to set the device back to a totally erased state, particularly when making partition table changes or OTA app updates. To erase the entire flash, run `make erase_flash`.
@ -92,11 +96,11 @@ This can be combined with other targets, ie `make erase_flash flash` will erase
# Resources
* The [docs directory of the esp-idf repository](docs) contains source of [esp-idf](http://esp-idf.readthedocs.io/) documentation.
* Documentation for the latest version: http://esp-idf.readthedocs.io/. This documentation is built from the [docs directory](docs) of this repository.
* The [esp32.com forum](http://esp32.com/) is a place to ask questions and find community resources.
* [Check the Issues section on github](https://github.com/espressif/esp-idf/issues) if you find a bug or have a feature request. Please check existing Issues before opening a new one.
* If you're interested in contributing to esp-idf, please check the [Contributions Guide](http://esp-idf.readthedocs.io/en/latest/contributing.html>).
* If you're interested in contributing to ESP-IDF, please check the [Contributions Guide](http://esp-idf.readthedocs.io/en/latest/contributing.html>).

View file

@ -494,7 +494,7 @@ esp_err_t i2c_set_period(i2c_port_t i2c_num, int high_period, int low_period)
return ESP_OK;
}
esp_err_t i2s_get_period(i2c_port_t i2c_num, int* high_period, int* low_period)
esp_err_t i2c_get_period(i2c_port_t i2c_num, int* high_period, int* low_period)
{
I2C_CHECK(i2c_num < I2C_NUM_MAX, I2C_NUM_ERROR_STR, ESP_ERR_INVALID_ARG);
I2C_ENTER_CRITICAL(&i2c_spinlock[i2c_num]);

View file

@ -401,7 +401,7 @@ esp_err_t i2c_set_period(i2c_port_t i2c_num, int high_period, int low_period);
* - ESP_OK Success
* - ESP_ERR_INVALID_ARG Parameter error
*/
esp_err_t i2s_get_period(i2c_port_t i2c_num, int* high_period, int* low_period);
esp_err_t i2c_get_period(i2c_port_t i2c_num, int* high_period, int* low_period);
/**
* @brief set I2C master start signal timing

View file

@ -3,8 +3,15 @@
#
COMPONENT_SRCDIRS := . hwcrypto
LIBS := core rtc phy
ifdef CONFIG_BT_ENABLED
LIBS += coexist
endif
ifdef CONFIG_WIFI_ENABLED
LIBS += net80211 pp wpa smartconfig coexist wps wpa2
endif
LIBS := core net80211 phy rtc pp wpa smartconfig coexist wps wpa2
LIBS := $(sort $(LIBS)) # de-duplicate, we can handle different orders here
LINKER_SCRIPTS += esp32.common.ld esp32.rom.ld esp32.peripherals.ld

View file

@ -71,9 +71,11 @@ static bool app_cpu_started = false;
#endif //!CONFIG_FREERTOS_UNICORE
static void do_global_ctors(void);
static void do_phy_init();
static void main_task(void* args);
extern void app_main(void);
#if CONFIG_ESP32_PHY_AUTO_INIT
static void do_phy_init();
#endif
extern int _bss_start;
extern int _bss_end;
@ -264,6 +266,7 @@ static void main_task(void* args)
vTaskDelete(NULL);
}
#if CONFIG_ESP32_PHY_AUTO_INIT
static void do_phy_init()
{
esp_phy_calibration_mode_t calibration_mode = PHY_RF_CAL_PARTIAL;
@ -297,3 +300,5 @@ static void do_phy_init()
esp_phy_release_init_data(init_data);
free(cal_data); // PHY maintains a copy of calibration data, so we can free this
}
#endif //CONFIG_ESP32_PHY_AUTO_INIT

View file

@ -62,6 +62,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "rom/queue.h"
#include "sdkconfig.h"
#include "esp_err.h"
#include "esp_wifi_types.h"
#include "esp_event.h"
@ -76,8 +77,8 @@ extern "C" {
#define ESP_ERR_WIFI_ARG ESP_ERR_INVALID_ARG /*!< Invalid argument */
#define ESP_ERR_WIFI_NOT_SUPPORT ESP_ERR_NOT_SUPPORTED /*!< Indicates that API is not supported yet */
#define ESP_ERR_WIFI_NOT_INIT (ESP_ERR_WIFI_BASE + 1) /*!< WiFi driver is not installed by esp_wifi_init */
#define ESP_ERR_WIFI_NOT_START (ESP_ERR_WIFI_BASE + 2) /*!< WiFi driver is not started by esp_wifi_start */
#define ESP_ERR_WIFI_NOT_INIT (ESP_ERR_WIFI_BASE + 1) /*!< WiFi driver was not installed by esp_wifi_init */
#define ESP_ERR_WIFI_NOT_STARTED (ESP_ERR_WIFI_BASE + 2) /*!< WiFi driver was not started by esp_wifi_start */
#define ESP_ERR_WIFI_IF (ESP_ERR_WIFI_BASE + 3) /*!< WiFi interface error */
#define ESP_ERR_WIFI_MODE (ESP_ERR_WIFI_BASE + 4) /*!< WiFi mode error */
#define ESP_ERR_WIFI_STATE (ESP_ERR_WIFI_BASE + 5) /*!< WiFi internal state error */
@ -85,7 +86,7 @@ extern "C" {
#define ESP_ERR_WIFI_NVS (ESP_ERR_WIFI_BASE + 7) /*!< WiFi internal NVS module error */
#define ESP_ERR_WIFI_MAC (ESP_ERR_WIFI_BASE + 8) /*!< MAC address is invalid */
#define ESP_ERR_WIFI_SSID (ESP_ERR_WIFI_BASE + 9) /*!< SSID is invalid */
#define ESP_ERR_WIFI_PASSWORD (ESP_ERR_WIFI_BASE + 10) /*!< Passord is invalid */
#define ESP_ERR_WIFI_PASSWORD (ESP_ERR_WIFI_BASE + 10) /*!< Password is invalid */
#define ESP_ERR_WIFI_TIMEOUT (ESP_ERR_WIFI_BASE + 11) /*!< Timeout error */
#define ESP_ERR_WIFI_WAKE_FAIL (ESP_ERR_WIFI_BASE + 12) /*!< WiFi is in sleep state(RF closed) and wakeup fail */
@ -97,11 +98,14 @@ typedef struct {
uint32_t rx_buf_num; /**< WiFi RX buffer number */
} wifi_init_config_t;
#ifdef CONFIG_WIFI_ENABLED
#define WIFI_INIT_CONFIG_DEFAULT() { \
.event_handler = &esp_event_send, \
.rx_buf_num = CONFIG_ESP32_WIFI_RX_BUFFER_NUM, \
};
#else
#define WIFI_INIT_CONFIG_DEFAULT #error Wifi is disabled in config, WIFI_INIT_CONFIG_DEFAULT will not work
#endif
/**
* @brief Init WiFi
@ -222,8 +226,8 @@ esp_err_t esp_wifi_connect(void);
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_INIT: WiFi was not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi was not started by esp_wifi_start
* - ESP_ERR_WIFI_FAIL: other WiFi internal errors
*/
esp_err_t esp_wifi_disconnect(void);
@ -246,7 +250,7 @@ esp_err_t esp_wifi_clear_fast_connect(void);
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_STARTED: WiFi was not started by esp_wifi_start
* - ESP_ERR_WIFI_ARG: invalid argument
* - ESP_ERR_WIFI_MODE: WiFi mode is wrong
*/
@ -266,7 +270,7 @@ esp_err_t esp_wifi_deauth_sta(uint16_t aid);
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_STARTED: WiFi was not started by esp_wifi_start
* - ESP_ERR_WIFI_TIMEOUT: blocking scan is timeout
* - others: refer to error code in esp_err.h
*/
@ -278,7 +282,7 @@ esp_err_t esp_wifi_scan_start(wifi_scan_config_t *config, bool block);
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
*/
esp_err_t esp_wifi_scan_stop(void);
@ -292,7 +296,7 @@ esp_err_t esp_wifi_scan_stop(void);
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_ARG: invalid argument
*/
esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number);
@ -307,7 +311,7 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number);
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by eps_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_ARG: invalid argument
* - ESP_ERR_WIFI_NO_MEM: out of memory
*/

View file

@ -23,10 +23,12 @@
#include "esp_err.h"
#include "esp_phy_init.h"
#include "esp_system.h"
#include "phy.h"
#include "esp_log.h"
#include "nvs.h"
#include "sdkconfig.h"
#ifdef CONFIG_WIFI_ENABLED
#include "phy.h"
#include "phy_init_data.h"
static const char* TAG = "phy_init";
@ -219,6 +221,4 @@ static esp_err_t store_cal_data_to_nvs_handle(nvs_handle handle,
return err;
}
void register_chipv7_phy_stub()
{
}
#endif // CONFIG_WIFI_ENABLED

View file

@ -17,6 +17,7 @@
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "esp_log.h"
#include "sdkconfig.h"
#include "rom/efuse.h"
#include "rom/cache.h"
#include "rom/uart.h"
@ -74,7 +75,9 @@ esp_err_t system_efuse_read_mac(uint8_t mac[6]) __attribute__((alias("esp_efuse_
void IRAM_ATTR esp_restart(void)
{
#ifdef CONFIG_WIFI_ENABLED
esp_wifi_stop();
#endif
// Disable scheduler on this core.
vTaskSuspendAll();

View file

@ -4,11 +4,11 @@ Logging library
Overview
--------
Log library has two ways of managing log verbosity: compile time, set via menuconfig; and runtime, using ``esp_log_set_level`` function.
Log library has two ways of managing log verbosity: compile time, set via menuconfig; and runtime, using ``esp_log_level_set`` function.
At compile time, filtering is done using ``CONFIG_LOG_DEFAULT_LEVEL`` macro, set via menuconfig. All logging statments for levels higher than ``CONFIG_LOG_DEFAULT_LEVEL`` will be removed by the preprocessor.
At run time, all logs below ``CONFIG_LOG_DEFAULT_LEVEL`` are enabled by default. ``esp_log_set_level`` function may be used to set logging level per module. Modules are identified by their tags, which are human-readable ASCII zero-terminated strings.
At run time, all logs below ``CONFIG_LOG_DEFAULT_LEVEL`` are enabled by default. ``esp_log_level_set`` function may be used to set logging level per module. Modules are identified by their tags, which are human-readable ASCII zero-terminated strings.
How to use this library
-----------------------
@ -51,11 +51,11 @@ At component scope, define it in component makefile:
CFLAGS += -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG
To configure logging output per module at runtime, add calls to ``esp_log_set_level`` function:
To configure logging output per module at runtime, add calls to ``esp_log_level_set`` function:
.. code-block:: c
esp_log_set_level("*", ESP_LOG_ERROR); // set all components to ERROR level
esp_log_set_level("wifi", ESP_LOG_WARN); // enable WARN logs from WiFi stack
esp_log_set_level("dhcpc", ESP_LOG_INFO); // enable INFO logs from DHCP client
esp_log_level_set("*", ESP_LOG_ERROR); // set all components to ERROR level
esp_log_level_set("wifi", ESP_LOG_WARN); // enable WARN logs from WiFi stack
esp_log_level_set("dhcpc", ESP_LOG_INFO); // enable INFO logs from DHCP client

View file

@ -15,7 +15,7 @@
/*
* Log library implementation notes.
*
* Log library stores all tags provided to esp_log_set_level as a linked
* Log library stores all tags provided to esp_log_level_set as a linked
* list. See uncached_tag_entry_t structure.
*
* To avoid looking up log level for given tag each time message is

View file

@ -68,7 +68,7 @@ Functions
.. doxygenfunction:: i2c_slave_write_buffer
.. doxygenfunction:: i2c_slave_read
.. doxygenfunction:: i2c_set_period
.. doxygenfunction:: i2s_get_period
.. doxygenfunction:: i2c_get_period
.. doxygenfunction:: i2c_set_start_timing
.. doxygenfunction:: i2c_get_start_timing
.. doxygenfunction:: i2c_set_stop_timing

View file

@ -22,15 +22,6 @@ Header Files
* `driver/include/driver/ledc.h <https://github.com/espressif/esp-idf/blob/master/components/driver/include/driver/ledc.h>`_
Data Structures
^^^^^^^^^^^^^^^
.. doxygenstruct:: ledc_channel_config_t
:members:
.. doxygenstruct:: ledc_timer_config_t
:members:
Macros
^^^^^^

View file

@ -15,7 +15,7 @@ Protocol layer works with the host via ``sdmmc_host_t`` structure. This structur
Application Example
-------------------
An example which combines SDMMC driver with FATFS library is provided in ``examples/24_sd_card`` directory. This example initializes the card, writes and reads data from it using POSIX and C library APIs. See README.md file in the example directory for more information.
An example which combines SDMMC driver with FATFS library is provided in ``examples/27_sd_card`` directory. This example initializes the card, writes and reads data from it using POSIX and C library APIs. See README.md file in the example directory for more information.
Protocol layer APIs

View file

@ -1,5 +1,5 @@
Sigma-delta Modulation
========
======================
Overview
--------

View file

@ -1,11 +1,7 @@
ESP32 Programming Guide
=======================
ESP-IDF Programming Guide
=========================
.. caution::
Until ESP-IDF release 1.0, this documentation is a draft. It is incomplete and may have mistakes. Please mind your step!
Documentation adressed to developers of applications for `ESP32 <https://espressif.com/en/products/hardware/esp32/overview>`_ by `Espressif <https://espressif.com/>`_ using `esp-idf <https://github.com/espressif/esp-idf>`_.
This is the documentation for Espressif IoT Developement Framework (`esp-idf <https://github.com/espressif/esp-idf>`_). ESP-IDF is the official development framework for the `ESP32 <https://espressif.com/en/products/hardware/esp32/overview>`_ chip.
Contents:

View file

@ -4,19 +4,13 @@ Set up of Toolchain for Mac OS
Step 0: Prerequisites
=====================
Getting MacPorts or homebrew
----------------------------
- install pip::
Whether you compile the toolchain from source or download binary toolchain, there are some dependencies which need to be installed on macOS first. These dependencies are installed with one of the package managers: homebrew or MacPorts. If you have these already, you can skip the following instructions.
sudo easy_install pip
- Install XCode from Mac App Store
- Open Terminal.app and run ``xcode-select --install``
- Run ``sudo xcodebuild -license`` and agree to XCode license
- Install MacPorts_ or homebrew_
.. _homebrew: http://brew.sh/
.. _MacPorts: https://www.macports.org/install.php
- install pyserial
sudo pip install pyserial
Step 1: Download binary toolchain for the ESP32
==================================================
@ -64,13 +58,18 @@ In any case, here are the steps to compile the toolchain yourself.
- Install dependencies:
- Install either MacPorts_ or homebrew_ package manager. MacPorts needs a full XCode installation, while homebrew only needs XCode command line tools.
.. _homebrew: http://brew.sh/
.. _MacPorts: https://www.macports.org/install.php
- with MacPorts::
sudo port install gsed gawk binutils gperf grep gettext ncurses
sudo port install gsed gawk binutils gperf grep gettext wget libtool autoconf automake
- with homebrew
- with homebrew::
brew install gnu-sed gawk binutils gperf grep gettext ncurses
brew install gnu-sed gawk binutils gperftools gettext wget help2man libtool autoconf automake
Create a case-sensitive filesystem image::

View file

@ -0,0 +1,2 @@
# Disable WiFi stack by default
CONFIG_WIFI_ENABLED=n

View file

@ -1,7 +1,4 @@
# Override some defaults so BT stack is enabled
# in this example
#
# BT config
#
# and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y
CONFIG_WIFI_ENABLED=n

View file

@ -1,7 +1,4 @@
# Override some defaults so BT stack is enabled
# in this example
#
# BT config
#
# and WiFi disabled by default in this example
CONFIG_BT_ENABLED=y
CONFIG_WIFI_ENABLED=n

View file

@ -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