[PDF] [PDF] ESP8266 Technical Reference - Espressif Systems

4, including the SCLK, MOSI, MISO and interrupt signal No 1 in the SPI protocol ( note: no CS signal) Downloading the ESP8266 SDIO can be different from 



Previous PDF Next PDF





[PDF] ESP8266EX Datasheet - Espressif Systems

when flashing bin files to ESP8266 Otherwise, the downloaded firmware/ program may not be working properly Table 3-1 High Frequency Clock Specifications



[PDF] ESP8266 Technical Reference - Espressif Systems

4, including the SCLK, MOSI, MISO and interrupt signal No 1 in the SPI protocol ( note: no CS signal) Downloading the ESP8266 SDIO can be different from 



[PDF] Internet of Things with ESP8266

16 mar 2015 · We also provide you with a PDF file that has color images of the screenshots/ the ESP8266 Arduino IDE that you downloaded earlier



[PDF] HOME AUTOMATION USING ARDUINO WIFI MODULE ESP8266

ARDUINO WIFI MODULE ESP8266" submitted for the B E Degree is Our The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet) controlled directly via COM port - you need to download our DRM Software to



[PDF] ESP8266 - ElectroSchematics

1 P a g e Espressif Systems Oct 12, 2013 ESP8266 802 11bgn Smart Device ESPRESSIF SMART CONNECTIVITY PLATFORM: ESP8266 



[PDF] [KG7L]â‹™ ESP8266: Programming NodeMCU Using Arduino IDE

Learn how to use the ESP8266 WiFi chip to build Internet of Things (IoT) projects Download ESP8266: Programming NodeMCU Using Arduino IDE - G pdf



[PDF] ESP8266 Web Server with Arduino IDE - Queso de cabra

Hello and thank you for downloading this project eBook This quick eBook is my step-by-step guide designed to help you build a web server with a WiFi module 



[PDF] Hands-On ESP8266: Mastering Basic Peripherals

14 oct 2018 · The step-by-step how to install NodeMCU's USB driver is described as the following: • Download NodeMCU V3 driver from this link: https://github



[PDF] Preface - EleCrow

1) Before you use the micro USB cable to connect the ESP8266 NodeMCU with your computer, you need to install the cp2012 USB driver you can download it 



[PDF] ESP8266 Serial Esp-01 WIFI Wireless - Components101

http://www seeedstudio com/document/ pdf /ESP8266 20Specifications(Chinese) pdf is used as an enable signal, the role of external serial flash, download

[PDF] espace campus france maurice

[PDF] espace de banach

[PDF] espace vectoriel normé

[PDF] espagnol pour les nuls pdf

[PDF] español de negocios para extranjeros pdf

[PDF] español en marcha 1 libro del alumno pdf

[PDF] espérance de vie au fil des siècles

[PDF] espérance de vie au québec

[PDF] espn 2019 nba draft grades

[PDF] espresso english advanced grammar pdf

[PDF] espresso english free english grammar e book level 3

[PDF] espresso english pdf

[PDF] esquiel's guide to magic weapons pdf

[PDF] essai de traction

[PDF] essay about air pollution

!Version 1.7 Copyright © 2020ESP8266 Technical Reference

About This Guide This document provides introduction to the interfaces integrated on ESP8266. Functional overview, parameter configuration, function description, application demos and other information is included. The document is structured as below. Release Notes ChapterTitleSubjectChapter 1OverviewOverall introduction to the interfaces.Chapter 2GPIODescription of GPIO functions, registers and parameter configuration.Chapter 3SPI Compatibility Mode User GuideDescription of functions, DEMO solution, ESP8266 software instruction and STM32 software solution.Chapter 4SPI Communication User GuideDescription of SPI functions, master/slave protocol format and API functions.Chapter 5SPI Overlap & Display Application GuideDescription of SPI functions, hardware connection of SPI overlap mode, API description and display screen console program demo.Chapter 6SPI Wi-Fi Passthrough 1-Interrupt ModeDescription of SPI functions, SPI slave protocol format, slave status and line breakage and API functions.Chapter 7SPI Wi-Fi Passthrough 2-Interrupt ModeDescription of SPI functions, SPI slave protocol format, data flow control line and API functions.Chapter 8HSPI Host Multi-device APIDescription of HSPI functions, hardware connection and API functions.Chapter 9I2C User GuideDescription of I2C functions, master interface and demo.Chapter 10I2S Module DescriptionDescription of I2S functions, system configuration and API functions.Chapter 11UART IntroductionDescription of UART functions, hardware resources, parameter configuration, interrupt configuration, example of interrupt handler process and abandon serial output during booting.Chapter 12PWM InterfaceDescription of PWM functions PWM, detailed on pwm.h, and custom channels.Chapter 13IR Remote Control User GuideIntroduction on infrared transmission, parameter configuration and functions of sample codes.Chapter 14Sniffer IntroductionIntroduction on Sniffer, application scenarios, phone App and IOT-device firmware.AppendixAppendixGPIO registers, SPI registers, UART registers, Timer registers.DateVersionRelease notes2016.05V1.0First release.

2016.06V1.1Added Section 4.5 Interface Description.2016.08V1.2Updated Section 14.1 Sniffer Introduction.2017.05V1.3Updated Section 4.1.2 SPI Features.2019.08V1.4Updated Section 1.1 General Purpose Input/Output Interface (GPIO).2020.07V1.5•Updated Section 1.3 Serial Peripheral Interface (SPI/HSPI); •Added documentation feedback links.2020.08V1.6•Updated Section 3.3.2 Instructions on The Read/Write Buffer and The Registration Linked List; •Updated Section 10.2.2 Link List Configuration.2020.10V1.7•Deleted the ESP8266 Pin List in Section 2.1; •Deleted the SPI description note in Section 4.5.2.DateVersionRelease notes

Table of Contents 1.Overview1

.................................................................................................................................1.1.General Purpose Input/Output Interface (GPIO)1

........................................................................1.2.Secure Digital Input/Output Interface (SDIO)1

.............................................................................1.3.Serial Peripheral Interface (SPI/HSPI)1

........................................................................................1.3.1.General SPI (Master/Slave)2

...........................................................................................1.3.2.HSPI (Master/Slave)2

......................................................................................................1.4.I2C Interface2

...............................................................................................................................1.5.I2S Interface3

...............................................................................................................................1.6.Universal Asynchronous Receiver Transmitter (UART)3

..............................................................1.7.Pulse-Width Modulation (PWM)4

.................................................................................................1.8.IR Remote Control4

.......................................................................................................................................2.1.Functional Overview6

...................................................................................................................2.2.Instruction on GPIO Registers7

...................................................................................................2.2.1.GPIO Function Selection Register7

................................................................................2.2.2.GPIO Output Registers7

.................................................................................................2.2.3.GPIO Input Register8

......................................................................................................2.2.4.GPIO Interrupt Registers8

..............................................................................................2.2.5.GPIO16 Related APIs9

...................................................................................................2.3.Parameter onfiguration9

...............................................................................................................2.3.1.Parameter Configuration for Scene 19

...........................................................................2.3.2.Parameter Configuration for Scene 210

.........................................................................2.3.3.Parameter Configuration for Scene 311

.........................................................................2.3.4.Interrupt Function Processing Procedures11

.................................................................2.3.5.Example of The Interrupt Function Processing Procedures12

.......................................3.SPI Compatibility Mode User Guide13

.....................................................................................3.1.Functional Overview13

.................................................................................................................3.2.DEMO Solution13

.................................................................................................................3.2.2.ESP8266 Software Compiling and Downloading13

.......................................................3.2.3.ESP8266 FLASH Software Downloading14

3.2.4.ESP8266 FLASH Software Downloading14

...................................................................3.3.ESP8266 Software Instruction15

.................................................................................................3.3.1.Protocol Principle: SDIO Line Breakage and SDIO Status Register15

...........................3.3.2.Instructions on The Read/Write Buffer and The Registration Linked List16

...................3.3.3.API Functions in The ESP8266 DEMO17

.......................................................................3.4.STM32 Software Instruction18

....................................................................................................3.4.1.Important functions18

.....................................................................................................4.SPI Communication User Guide21

..................................................................................................................................4.1.1.Functional Overview21

...................................................................................................4.1.2.SPI Features21

...............................................................................................................4.2.ESP8266 SPI Master Protocol Format21

.....................................................................................4.2.1.Communication Format Supported by Master SPI21

....................................................4.2.2.Master SPI Communication Format Supported by Current API22

.................................4.3.ESP8266 SPI Slave Protocol Format22

.......................................................................................4.3.1.SPI Slave Clock Polarity Configuration Requirement22

.................................................4.3.2.Communication Format Supported by Slave SPI22

.......................................................4.3.3.Command Definition Supported by Slave SPI22

............................................................4.3.4.Slave SPI Communication Format Supported by Current API23

...................................4.4.API Function Description of SPI Module23

..................................................................................4.4.1.API Function Description of Master SPI23

.....................................................................4.4.2.Master SPI API Function Description25

.........................................................................4.5.SPI Interface Description27

.........................................................................................................4.5.1.Data Structure27

.............................................................................................................4.5.2.API Description30

...........................................................................................................4.5.3.SPI_Test Demo35

...........................................................................................................5.SPI Overlap & Display Application Guide46

.............................................................................5.1.Functional Overview46

.................................................................................................................5.2.Hardware Connection of SPI Overlap Mode47

............................................................................5.3.API Description of SPI Overlap Mode47

......................................................................................5.4.Display Screen Console Program DEMO48

.................................................................................5.4.1.Connection Description48

..............................................................................................5.4.2.API Function Description48

............................................................................................5.4.3.Pre-compiled Macro Setting50

.......................................................................................6.SPI Wi-Fi Passthrough 1-Interrupt Mode51

6.1.Functional Overview51

.................................................................................................................6.2.ESP8266 SPI Slave Protocol Format51

.......................................................................................6.2.1.SPI Slave Clock Polarity Configuration51

......................................................................6.2.2.Communication Format Supported by The SPI Slave51

................................................6.3.Slave Status Definition and Line Breakage52

..............................................................................6.3.1.Status Definition52

.........................................................................................................6.3.2.GPIO0 Line Breakage52

.................................................................................................6.4.ESP8266 SPI Slave API Functions52

...........................................................................................7.SPI Wi-Fi Passthrough 2-Interrupt Mode58

.............................................................................7.1.Functional Overview58

.................................................................................................................7.2.ESP8266 SPI Slave Protocol Format58

.......................................................................................7.2.1.SPI Slave Clock Polarity Configuration58

......................................................................7.2.2.Communication Format Supported by The SPI Slave58

................................................7.3.Instruction on The Data Flow Control Line59

...............................................................................7.3.1.GPIO0 MOSI Buffer Status59

.........................................................................................7.3.2.GPIO2 Master Receives The Slave Send Buffer Status59

.............................................7.3.3.Master Communication Logic Implementation59 ...........................................................7.4.ESP8266 SPI Slave API Functions61

...........................................................................................8.HSPI Host Multi-device API64

..................................................................................................8.1.Functional Overview64

.................................................................................................................8.2.Hardware Connection64

..............................................................................................................8.3.API Description65

........................................................................................................................9.I2C User Guide67

.....................................................................................................................9.1.Functional Overview67

.................................................................................................................9.2.I2C master Interface67

.................................................................................................................9.2.2.Start I2C67

......................................................................................................................9.2.3.Stop I2C68

......................................................................................................................9.2.4.I2C Master Responds ACK68

.........................................................................................9.2.5.I2C Master Responds NACK68

......................................................................................9.2.6.Check I2C Slave Response69

........................................................................................9.2.7.Write Data on I2C Bus69

................................................................................................9.2.8.Read Data from I2C Bus69

10.I2S Module Description71

........................................................................................................10.1.Functional Overview71

.................................................................................................................10.2.System Configuration71

...............................................................................................................10.2.1.I2S Module Configuration71

...........................................................................................10.2.2.Link List Configuration74

................................................................................................10.2.3.SLC Module Configuration75

.........................................................................................10.3.API Function Description75

.........................................................................................................10.3.1.Void Function76

..............................................................................................................10.3.2.CONF Function76

...........................................................................................................10.3.3.START Function77

..........................................................................................................11.UART Introduction78

................................................................................................................11.1.Functional Overview78

.................................................................................................................11.2.Hardware Resources79

................................................................................................................11.3.Parameter Configuration79

..........................................................................................................11.3.1.The Baud Rate79

............................................................................................................11.3.2.Parity Bit80

.....................................................................................................................11.3.3.Data Bit80

.......................................................................................................................11.3.4.Stop Bit80

......................................................................................................................11.3.6.Switch Output Port of Print Function81

..........................................................................11.3.7.Read The Remaining Number of Bytes in tx / rx Queue81

.............................................11.3.8.Loopback Operation (loop-back)81

................................................................................11.3.9.Line Stop Signal81

..........................................................................................................11.3.10.Flow Control81

...............................................................................................................11.3.11.Other Interfaces82

..........................................................................................................11.4.Configure Interrupt82

...................................................................................................................11.4.1.Interrupt register82

......................................................................................................................11.4.3.Interrupt Type83

..............................................................................................................11.5.Example of Interrupt Handler Process87

.....................................................................................11.6.Abandon Serial Output During Booting87

...................................................................................12.PWM Interface89

......................................................................................................................12.1.Functional Overview89

12.1.3.Configuration90

..............................................................................................................12.1.4.Parameter Specification90

.............................................................................................12.2.Details on pwm.h90

.....................................................................................................................12.2.1.Sample Codes90

............................................................................................................12.2.2.Interface Specifications91

..............................................................................................12.3.Custom Channels93

.....................................................................................................................13.IR Remote Control User Guide95

.............................................................................................13.1.Introduction to Infrared Transmission95

....................................................................................................................13.2.Parameters Configuration96

........................................................................................................13.3.Functions of Infrared Sample Codes97

.......................................................................................14.Sniffer Introduction98

...............................................................................................................14.1.Sniffer Introduction98

...................................................................................................................14.2.Sniffer Application Scenarios101

.................................................................................................14.3.Phone APP103

.............................................................................................................................14.4.IOT-device Firmware103

!1. Overview1.Overview 1.1.General Purpose Input/Output Interface (GPIO) ESP8266EX has 17 GPIO pins which can be assigned to various functions by programming the appropriate registers. Each GPIO can be configured with internal pull-up or pull-down, or set to high impedance, and when configured as an input, the data are stored in software registers; the input can also be set to edge-trigger or level trigger CPU interrupts. In short, the IO pads are bi-directional, non-inverting and tristate, which includes input and output buffer with tristate control inputs. These pins can be multiplexed with other functions such as I2C, I2S, UART, PWM, IR Remote Control, etc. 1.2.Secure Digital Input/Output Interface (SDIO) ESP8266EX has one Slave SDIO, the definitions of which are described below. 4-bit 25 MHz SDIO v1.1 and 4-bit 50 MHz SDIO v2.0 are supported. 1.3.Serial Peripheral Interface (SPI/HSPI) ESP8266EX has 3 SPIs. One general Slave/Master SPI One Slave SDIO/SPI One general Slave/Master HSPI Functions of all these pins can be implemented via hardware. The pin definitions are described as below. Table 1-1: Pin DeÞnitions of SDIOsPin NamePin NumIOFunction NameSDIO_CLK 21IO6SDIO_CLK SDIO_DATA022IO7SDIO_DATA0SDIO_DATA123IO8SDIO_DATA1SDIO_DATA_218IO9SDIO_DATA_2SDIO_DATA_319IO10SDIO_DATA_3SDIO_CMD20IO11SDIO_CMDEspressif !/104 1Submit Documentation Feedback2020.10

!1. Overview1.3.1.General SPI (Master/Slave) 1.3.2.HSPI (Master/Slave) 1.4.I2C Interface ESP8266EX has one I2C used to connect with micro-controller and other peripheral equipments such as sensors. The pin definition of I2C is as below. Both I2C Master and I2C Slave are supported. I2C interface functionality can be realized via software programming, the clock frequency reaches 100 kHz at a maximum. It should be noted that I2C clock frequency should be higher than the slowest clock frequency of the slave device. Table 1-2. Pin DeÞnitions of SPIsPin NamePin NumIOFunction NameSDIO_CLK21IO6SPICLKSDIO_DATA022IO7SPIQ/MISOSDIO_DATA123IO8SPID/MOSISDIO_DATA_218IO9SPIHDSDIO_DATA_319IO10SPIWPU0TXD26IO1SPICS1GPIO015IO0SPICS2í ½ Note: SPI mode can be implemented via software programming. The clock frequency is 80 MHz at maximum.Table 1-3. Pin DeÞnitions of HSPIPin NamePin NumIOFunction NameMTMS9IO14HSPICLKMTDI10IO12HSPIQ/MISOMTCK12IO13HSPID/MOSIMTDO13IO15HPSICSTable 1-4. Pin DeÞnitions of I2CPin NamePin NumIOFunction NameMTMS9IO14I2C_SCLGPIO214IO2I2C_SDAEspressif !/104 2Submit Documentation Feedback2020.10

!1. Overview1.5.I2S Interface ESP8266EX has one I2S data input interface and one I2S data output interface. I2S interfaces are mainly used in applications such as data collection, processing, and transmission of audio data, as well as the input and output of serial data. For example, LED lights (WS2812 series) are supported. The pin definition of I2S is as below. I2S functionality can be enabled via software programming by using multiplexed GPIOs, and linked list DMA is supported. 1.6.Universal Asynchronous Receiver Transmitter (UART) ESP8266EX has two UART interfaces UART0 and UART, the definitions are as below. Data transfers to/from UART interfaces can be implemented via hardware. The data transmission speed via UART interfaces reaches 115200 x 40 (4.5 Mbps). UART0 can be used for communication. It supports fluid control. Since UART1 features only data transmit signal (Tx), it is usually used for printing log. Table 1-5. Pin DeÞnitions of I2SI2S Data InputPin NamePin NumIOFunction NameMTDI10IO12I2SI_DATAMTCK12IO13I2SI_BCKMTMS9IO14I2SI_WSMTDO13IO15I2SO_BCKU0RXD25IO3I2SO_DATAGPIO214IO2I2SO_WSTable 1-6. Pin DeÞnitions of UARTPin TypePin NamePin NumIOFunction NameUART0U0RXD25IO3U0RXDU0TXD26IO1U0TXDMTDO13IO15U0RTSMTCK12IO13U0CTSUART1GPIO214IO2U1TXDSD_D123IO8U1RXDEspressif !/104 3Submit Documentation Feedback2020.10

!1. Overview1.7.Pulse-Width Modulation (PWM) ESP8266EX has four PWM output interfaces. They can be extended by users themselves. The pin definitions of the PWM interfaces are defined as below. The functionality of PWM interfaces can be implemented via software programming. For example, in the LED smart light demo, the function of PWM is realized by interruption of the timer, the minimum resolution reaches as much as 44 ns. PWM frequency range is adjustable from 1000 μs to 10000 μs, i.e., between 100Hz and 1 kHz. When the PWM frequency is 1 kHz, the duty ratio will be 1/22727, and over 14 bit resolution will be achieved at 1 kHz refresh rate. 1.8.IR Remote Control

One Infrared remote control interface is defined as below. The functionality of Infrared remote control interface can be implemented via software programming. NEC coding, modulation, and demodulation are used by this interface. The frequency of modulated carrier signal is 38 kHz, while the duty ratio of the square wave is 1/3. The transmission range is around 1m which is determined by two factors: one is the maximum value of rated current, the other is internal current-limiting resistance value in the infrared receiver. The larger the resistance value, the lower the current, so is the power, and vice versa. The transmission angle is between 15° and 30° which is determined by the radiation direction of the infrared receiver. í ½ Note: By default, UART0 outputs some printed information when the device is powered on and booting up. The baud rate of the printed information is relevant to the frequency of the external crystal oscillator. If the frequency of the crystal oscillator is 40 MHz, then the baud rate for printing is 115200; if the frequency of the crystal oscillator is 26 MHz, then the baud rate for printing is 74880. If the printed information exerts any influence on the functionality of the device, it is suggested to block the printing during the power-on period by changing (U0TXD,U0RXD) to (MTDO,MTCK).Table 1-7. Pin DeÞnitions of PWMPin NamePin NumIOFunction NameMTDI10IO12PWM0MTDO13IO15PWM1MTMS9IO14PWM2GPIO416IO4PWM3Table 1-8. Pin DeÞnitions of IR Remote ControlPin NamePin NumIOFunction NameMTMS9IO14IR TxGPIO524IO5IR RxEspressif !/104 4Submit Documentation Feedback2020.10

!1. Overview1.9.Sniffer ESP8266 can enter promiscuous mode (sniffer). ESP8266 can capture complete IEEE 802.11 packets in the air or it can obtain the length of the packets. Espressif !/104 5Submit Documentation Feedback2020.10

!2. GPIO2.GPIO 2.1.Functional Overview The ESP8266 has 16 general IOs. Their pin numbers and names are shown in the table below: In the QUAD mode flash, 6 IO interfaces are used for flash communication. In the DUAL mode flash, 4 IO interfaces are used for flash communication. Table 2-1. GPIO Pin DeÞnitionGPIO NO.Pin NO.Pin nameGPIO0pin15GPIO0_UGPIO1pin26U0TXD_UGPIO2pin14GPIO2_UGPIO3pin25U0RXD_UGPIO4pin16GPIO4_UGPIO5pin24GPIO5_UGPIO6pin21SD_CLK_UGPIO7pin22SD_DATA0_UGPIO8pin23SD_DATA1_UGPIO9pin18SD_DATA2_UGPIO10pin19SD_DATA3_UGPIO11pin20SD_CMD_UGPIO12pin10MTDI_UGPIO13pin12MTCK_UGPIO14pin9MTMS_UGPIO15pin13MTDO_Uí ½ Note: Users may find the following documents helpful: •Appendix 1 - GPIO Registers.Espressif !/! 6104Submit Documentation Feedback2020.10

!2. GPIOÂ¥Output high level register GPIO_OUT_W1TS bit[15:0] output high level bit (write only register): If the related bit is set to be 1, it means the IO output is high level (at the same time, users should enable the output). Bit[15:0] contains 16 GPIO output statuses. Â¥Output status register GPIO_OUT bit[15:0] output status bit (read/write register): Value of bit[15:0] of this register shows the related pin output status. Bit[15:0] of GPIO_OUT is decided by bit[15:0] of GPIO_OUT_W1TS and bit[15:0] of GPIO_OUT_W1TC. For example, when bit[1] of GPIO_OUT_W1TS =1, then GPIO_OUT[1] =1; when bit[2] of GPIO_OUT_W1TC = 1, then GPIO_OUT[2]=0. 2.2.3.GPIO Input Register bit[15:0] the input status bit (readable and writable): If the related bit is set to be 1, the IO pin status is high level. If the related bit is set to be 0, the IO pin status is low level. Bit[15:0] contains 16 GPIO input status bits. 2.2.4.GPIO Interrupt Registers Â¥Interrupt type register GPIO_PIN12 (this register differs for different GPIOs) bit[9:7] (readable and writable): 0: the GPIO interrupt is disabled 1: rising edge triggered interrupt 2: falling edge triggered interrupt 3: double-edge triggered interrupt 4: low level 5: high level Â¥Interrupt status register GPIO_STATUS Bit[15:0] (readable and writable): If the related bit is set to be 1, the IO interrupts. Bit[15:0] contains 16 GPIOs. Â¥Interrupt clearing register GPIO_STATUS_W1TC Bit[15:0] (readable and writable): í ½ Note: If users need to set the pin to low level, they need to configure the GPIO_OUT_W1TC register.í ½ Note: The GPIO input detection function is enabled by default.Espressif !/! 8104Submit Documentation Feedback2020.10

!2. GPIOWrite 1 into the related bit, the related GPIO interrupt status will be cleared. 2.2.5.GPIO16 Related APIs Different from other IO interfaces, GPIO16(XPD_DCDC) belongs to the RTC module instead of the general GPIO module. It can be used to wake up the chip during deep-sleep; it can be configured to input or output mode; but it cannot trigger the IO interrupt. the APIs are shown below. ¥gpio16_output_conf(void) Set the GPIO16 to the output mode. ¥gpio16_output_set(uint8 value) Output high/low level from GPIO16. Configure GPIO16 to the output mode first. ¥gpio16_input_conf(void) Set the GPIO16 to the input mode. ¥gpio16_input_get(void) Read the GPIO16 input level status. Configure GPIO16 to the input mode first. 2.3.Parameter onÞguration Three scenes are given as examples for parameter configuration: •Configure the MTDI output high level, and enable the pull up. •Configure the MTDI to the input mode, and get its level status. •Configure the MTDI to falling edge triggers interrupt. 2.3.1.Parameter ConÞguration for Scene 1 1.Configure the MTDI to GPIO mode. PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U,FUNC_GPIO12); This sentence writes 1 into bits 4-5 of PERIPHS_IO_MUX_MTDI_U register. When bits 4-5 of PERIPHS_IO_MUX_MTDI_U are set to be 1, the MTDI is configured to the GPIO mode. For details of PERIPHS_IO_MUX_MTDI_U register, refer to Section 2.2, Instruction on GPIO Register. 2.Configure the MTDI output high level. GPIO_OUTPUT_SET(GPIO_ID_PIN(12), 1); This sentence has two functions: •Write 1 into bit 12 of GPIO_ENABLE_W1TS register. It enables the MTDI output function. •Write 1 into bit 12 of GPIO_OUT_W1TS register. It sets MTDI output to high level. Espressif !/! 9104Submit Documentation Feedback2020.10

!2. GPIOGPIO_OUTPUT_SET(GPIO_ID_PIN(12), 0); This sentence has two functions: •Write 1 into bit 12 of GPIO_ENABLE_W1TS register. It enables the MTDI output function. •Write 1 into bit 12 of GPIO_OUT_W1TC register. It sets MTDI output to low level. 3.Enable the MTDI pull up. PIN_PULLUP_EN(PERIPHS_IO_MUX_MTDI_U); It writes 1 into bit 7 of PERIPHS_IO_MUX_MTDI_U. It enables the MTDI pull up. PIN_PULLUP_DIS(PERIPHS_IO_MUX_MTDI_U); 2.3.2.Parameter ConÞguration for Scene 2 1.Configure the MTDI to GPIO mode. PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U,FUNC_GPIO12); This sentence writes 1 into bits 4-5 of PERIPHS_IO_MUX_MTDI_U register. When bits 4-5 of PERIPHS_IO_MUX_MTDI_U are set to be 1, the MTDI is configured to the GPIO mode. 2.Configure the MTDI to the input mode. GPIO_DIS_OUTPUT(GPIO_ID_PIN(12)); 3.Get the MTDI pin level status. Uint8 level=0; level=GPIO_INPUT_GET(GPIO_ID_PIN(12))quotesdbs_dbs6.pdfusesText_11