esp32c2.inc 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. .. This file gets included from other .rst files in this folder.
  2. .. It contains target-specific snippets.
  3. .. Comments and '---' lines act as delimiters.
  4. ..
  5. .. This is necessary mainly because RST doesn't support substitutions
  6. .. (defined in RST, not in Python) inside code blocks. If that is ever implemented,
  7. .. These code blocks can be moved back to the main .rst files, with target-specific
  8. .. file names being replaced by substitutions.
  9. .. gpio-summary
  10. The {IDF_TARGET_NAME} chip features 21 physical GPIO pins (GPIO0 ~ GPIO20). For chip variants with an SiP flash built in, GPIO11 ~ GPIO17 are dedicated to connecting the SiP flash; therefore, only 14 GPIO pins are available.
  11. Each pin can be used as a general-purpose I/O, or to be connected to an internal peripheral signal. Through GPIO matrix and IO MUX, peripheral input signals can be from any IO pins, and peripheral output signals can be routed to any IO pins. Together these modules provide highly configurable I/O. 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>`__].
  12. The table below provides more information on pin usage, and please note the comments in the table for GPIOs with restrictions.
  13. .. list-table::
  14. :header-rows: 1
  15. :widths: 12 12 22
  16. * - GPIO
  17. - Analog Function
  18. - Comments
  19. * - GPIO0
  20. - ADC1_CH0
  21. - RTC
  22. * - GPIO1
  23. - ADC1_CH1
  24. - RTC
  25. * - GPIO2
  26. - ADC1_CH2
  27. - RTC
  28. * - GPIO3
  29. - ADC1_CH3
  30. - RTC
  31. * - GPIO4
  32. - ADC1_CH4
  33. - RTC
  34. * - GPIO5
  35. -
  36. - RTC
  37. * - GPIO6
  38. -
  39. -
  40. * - GPIO7
  41. -
  42. -
  43. * - GPIO8
  44. -
  45. - Strapping pin
  46. * - GPIO9
  47. -
  48. - Strapping pin
  49. * - GPIO10
  50. -
  51. -
  52. * - GPIO11
  53. -
  54. -
  55. * - GPIO12
  56. -
  57. - SPI0/1
  58. * - GPIO13
  59. -
  60. - SPI0/1
  61. * - GPIO14
  62. -
  63. - SPI0/1
  64. * - GPIO15
  65. -
  66. - SPI0/1
  67. * - GPIO16
  68. -
  69. - SPI0/1
  70. * - GPIO17
  71. -
  72. - SPI0/1
  73. * - GPIO18
  74. -
  75. -
  76. * - GPIO19
  77. -
  78. -
  79. * - GPIO20
  80. -
  81. -
  82. .. note::
  83. - Strapping pin: GPIO8 and GPIO9 are strapping pins. For more information, please refer to `ESP8684 datasheet <https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_en.pdf>`_.
  84. - SPI0/1: GPIO12-17 are usually used for SPI flash and not recommended for other uses.
  85. - RTC: GPIO0-5 can be used to wake up the chip from Deep-sleep mode. Other GPIOs can only wake up the chip from Light-sleep mode. For more information, please refer to Section :ref:`Wakeup Sources<api-reference-wakeup-source>`.
  86. ---