User Tools

Site Tools


tutorials:wireless:esp:esp32:esp32_io_information

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:wireless:esp:esp32:esp32_io_information [2018/02/07 17:15]
modtronix
tutorials:wireless:esp:esp32:esp32_io_information [2019/05/07 03:06] (current)
modtronix
Line 6: Line 6:
 ====== Using with Arduino IDE ====== ====== Using with Arduino IDE ======
 For details, see [[https://​github.com/​espressif/​arduino-esp32|Using with Arduino]]. For details, see [[https://​github.com/​espressif/​arduino-esp32|Using with Arduino]].
 +
  
 ====== Pinouts & GPIO Pins ====== ====== Pinouts & GPIO Pins ======
  
 ^ ESP32 Pin ^ Analog ^ DAC/T ^ Serial ^ NodeMCU ^ Wrover ^ Note ^ ^ ESP32 Pin ^ Analog ^ DAC/T ^ Serial ^ NodeMCU ^ Wrover ^ Note ^
-| GPIO0  | ADC2-1 ​ | Touch 1 |         | Firmware Button \\ to 0V |     | Default **Pull-Up**. Bootloader Mode=0, Run Mode=1 |+| GPIO0  | ADC2-1 ​ | Touch 1 |         ​| ​User/Firmware Button \\ to 0V |     | Default **Pull-Up**. Bootloader Mode=0, Run Mode=1 |
 | GPIO1  |         ​| ​        | TX0     | USB TX |     | On the ESP32-NodeMCU,​ this pin is used for the USB to Serial converter TX pin    | | GPIO1  |         ​| ​        | TX0     | USB TX |     | On the ESP32-NodeMCU,​ this pin is used for the USB to Serial converter TX pin    |
 | GPIO2  | ADC2-2 ​ | Touch 2 |         | LED, 1=ON |     | Default **Pull-Down**. Must be 0 to enter Bootloader Mode (when GPIO0=0). | | GPIO2  | ADC2-2 ​ | Touch 2 |         | LED, 1=ON |     | Default **Pull-Down**. Must be 0 to enter Bootloader Mode (when GPIO0=0). |
Line 16: Line 17:
 | GPIO4  | ADC2-0 ​ | Touch 0 |         ​| ​    ​| ​    ​| ​    ​| ​ | GPIO4  | ADC2-0 ​ | Touch 0 |         ​| ​    ​| ​    ​| ​    ​| ​
 | GPIO5  |         ​| ​        | VSPI-SS ​   |     ​| ​    | Default **Pull-up**,​ use to determine timing of SDIO Slave. | | GPIO5  |         ​| ​        | VSPI-SS ​   |     ​| ​    | Default **Pull-up**,​ use to determine timing of SDIO Slave. |
-| GPIO12 | ADC2-5 ​ | Touch 5 | MISO    |     ​| ​    | Default **Pull-down**. If 1 at PU, sets flash = 1.8V, else standard 3.3V. |+| GPIO12 | ADC2-5 ​ | Touch 5 | MISO    |     ​| ​    | Default **Pull-down**. If 1 at PU, sets flash = 1.8V, else standard 3.3V. **MUST be 0** at PU for 3.3V board! ​|
 | GPIO13 | ADC2-4 ​ | Touch 4 | MOSI    |     ​| ​    ​| ​    | | GPIO13 | ADC2-4 ​ | Touch 4 | MOSI    |     ​| ​    ​| ​    |
 | GPIO14 | ADC2-6 ​ | Touch 6 | CLK     ​| ​    ​| ​    ​| ​    | | GPIO14 | ADC2-6 ​ | Touch 6 | CLK     ​| ​    ​| ​    ​| ​    |
-| GPIO15 | ADC2-3 ​ | Touch 3 | SS      |     ​| ​    | Default **Pull-up**. If 0, silence ​boot message. |+| GPIO15 | ADC2-3 ​ | Touch 3 | SS      |     ​| ​    | Default **Pull-up**. If 0 at PUsilences ​boot messages printed by the ROM bootloader.|
 | GPIO16 |         ​| ​        | RX2     ​| ​    ​| ​    | **NOT AVAILABLE** on Wrover, used for PSRAM CS ! | | GPIO16 |         ​| ​        | RX2     ​| ​    ​| ​    | **NOT AVAILABLE** on Wrover, used for PSRAM CS ! |
 | GPIO17 |         ​| ​        | TX2     ​| ​    ​| ​    | **NOT AVAILABLE** on Wrover, used for PSRAM CLK ! | | GPIO17 |         ​| ​        | TX2     ​| ​    ​| ​    | **NOT AVAILABLE** on Wrover, used for PSRAM CLK ! |
Line 73: Line 74:
  
 ===== SPI, HSPI and VSPI ===== ===== SPI, HSPI and VSPI =====
-The ESP32 has SPI peripherals(SPI, HSPI and VSPI). ​They can be configured for slave and master modes in 1-line +The ESP32 has SPI peripherals(SPI0, SPI1, HSPI and VSPI), of which 2(HSPI and VSPI) are available to the user. 
-full-duplex and 1/2/4-line half-duplex communication modes. ​+ 
 +SPI Peripherals ​can be configured for slave and master modes in 1-line full-duplex and 1/2/4-line half-duplex communication modes. ​
 They support the following general-purpose SPI features: They support the following general-purpose SPI features:
   * Four timing modes of the SPI format transfer, which depend on the polarity (POL) and the phase (PHA)   * Four timing modes of the SPI format transfer, which depend on the polarity (POL) and the phase (PHA)
Line 81: Line 83:
   * Each SPI can be served by DMA   * Each SPI can be served by DMA
  
-It seems like the first SPI (just referred to as SPI) is used for the external Flash, and is not available to the user! +SPI0 and SPI1 are used for the external Flash, and are not available to the user! 
-This leaves two SPI peripherals for general use, HSPI and VSPI. They have default pins, but can also be assigned to any other +This leaves two SPI peripherals for general use, HSPI and VSPI. They have default pins(IOMUX pins), but can also be assigned to any other 
-I/O pin using the Pin Matrix.+I/O pin using the Pin Matrix. When using the default pins, speeds up to 80MBits/sec is possible, where 40MBits/sec is the limit when 
 +using the pin matrix. For details, see [[https://​docs.espressif.com/​projects/​esp-idf/​en/​latest/​api-reference/​peripherals/​spi_master.html#​gpio-matrix-and-iomux|this page]].
  
 The default pins for HSPI are: The default pins for HSPI are:
-  * SS = GPIO ? +  * SS = GPIO 15 
-  * CLK = GPIO ? +  * CLK = GPIO 14 
-  * MISO = GPIO ? +  * MISO = GPIO 12 
-  * MOSI = GPIO ?+  * MOSI = GPIO 13
  
 The default pins for VSPI are: The default pins for VSPI are:
Line 135: Line 138:
 The following pins are used for Buttons and LEDs on common ESP32 based boards: The following pins are used for Buttons and LEDs on common ESP32 based boards:
  
-===== ESP32 Boot Mode Selection ​=====+===== ESP32 Strapping Pins ===== 
 +**GPIO0**, **GPIO5** and **GPIO15** have pull-**up** resistors enabled during power up.\\ 
 +**GPIO2** and **GPIO12** have pull-**down** resistors enabled during power up.\\ 
 +These pull-up and pull-down resistors can be disabled via software once the device is running. 
 The ESP32 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash. The ESP32 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise it will run the program in flash.
  
Line 143: Line 150:
  
 GPIO2 must also be either left unconnected/​floating,​ or driven Low, in order to enter the serial bootloader. GPIO2 must also be either left unconnected/​floating,​ or driven Low, in order to enter the serial bootloader.
 +
 +===== EN(RST) Pin =====
 +The EN pin is the 3.3V regulator’s enable pin. It’s pulled up, so connect to ground to disable the 3.3V regulator. This means that you can use
 +this pin connected to a push button to restart your ESP32, for example. This pin does NOT go low during a software reset of the ESP32.
  
tutorials/wireless/esp/esp32/esp32_io_information.1518041755.txt.gz · Last modified: 2018/02/07 17:15 by modtronix