gpio.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. GPIO & RTC GPIO
  2. ===============
  3. Overview
  4. --------
  5. .. only:: esp32
  6. The {IDF_TARGET_NAME} chip features 40 physical GPIO pads. Some GPIO pads cannot be used or do not have the corresponding pin on the chip package. For more details, see *{IDF_TARGET_NAME} Technical Reference Manual* > *IO MUX and GPIO Matrix (GPIO, IO_MUX)* [`PDF <{IDF_TARGET_TRM_EN_URL}#iomuxgpio>`__]. Each pad can be used as a general purpose I/O or can be connected to an internal peripheral signal.
  7. - Note that GPIO6-11 are usually used for SPI flash.
  8. - GPIO34-39 can only be set as input mode and do not have software pullup or pulldown functions.
  9. .. only:: esp32s2
  10. The {IDF_TARGET_NAME} chip features 43 physical GPIO pads. Some GPIO pads cannot be used or do not have the corresponding pin on the chip package. For more details, see *{IDF_TARGET_NAME} Technical Reference Manual* > *IO MUX and GPIO Matrix (GPIO, IO_MUX)* [`PDF <{IDF_TARGET_TRM_EN_URL}#iomuxgpio>`__]. Each pad can be used as a general purpose I/O or can be connected to an internal peripheral signal.
  11. - Note that GPIO26-32 are usually used for SPI flash.
  12. - GPIO46 is fixed to pull-down and is input only
  13. .. only:: SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
  14. There is also separate "RTC GPIO" support, which functions when GPIOs are routed to the "RTC" low-power and analog subsystem. These pin functions can be used when:
  15. .. list::
  16. - In deep sleep
  17. :SOC_ULP_SUPPORTED: - The :doc:`Ultra Low Power co-processor <../../api-guides/ulp>` is running
  18. - Analog functions such as ADC/DAC/etc are in use.
  19. Application Example
  20. -------------------
  21. GPIO output and input interrupt example: :example:`peripherals/gpio/generic_gpio`.
  22. API Reference - Normal GPIO
  23. ---------------------------
  24. .. include-build-file:: inc/gpio.inc
  25. .. include-build-file:: inc/gpio_types.inc
  26. .. only:: SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
  27. API Reference - RTC GPIO
  28. ------------------------
  29. .. include-build-file:: inc/rtc_io.inc
  30. .. include-build-file:: inc/rtc_io_types.inc