gpio.rst 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935
  1. GPIO & RTC GPIO
  2. ===============
  3. :link_to_translation:`zh_CN:[中文]`
  4. Overview
  5. --------
  6. .. only:: esp32
  7. The {IDF_TARGET_NAME} chip features 34 physical GPIO pins (GPIO0 ~ GPIO19, GPIO21 ~ GPIO23, GPIO25 ~ GPIO27, and GPIO32 ~ GPIO39). Each pin can be used as a general-purpose I/O, or be connected to an internal peripheral signal. Through IO MUX, RTC IO MUX and the GPIO matrix, 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>`__].
  8. The table below provides more information on pin usage, and please note the comments in the table for GPIOs with restrictions.
  9. .. list-table::
  10. :header-rows: 1
  11. :widths: 8 12 12 20
  12. * - GPIO
  13. - Analog Function
  14. - RTC GPIO
  15. - Comments
  16. * - GPIO0
  17. - ADC2_CH1
  18. - RTC_GPIO11
  19. - Strapping pin
  20. * - GPIO1
  21. -
  22. -
  23. - TXD
  24. * - GPIO2
  25. - ADC2_CH2
  26. - RTC_GPIO12
  27. - Strapping pin
  28. * - GPIO3
  29. -
  30. -
  31. - RXD
  32. * - GPIO4
  33. - ADC2_CH0
  34. - RTC_GPIO10
  35. -
  36. * - GPIO5
  37. -
  38. -
  39. - Strapping pin
  40. * - GPIO6
  41. -
  42. -
  43. - SPI0/1
  44. * - GPIO7
  45. -
  46. -
  47. - SPI0/1
  48. * - GPIO8
  49. -
  50. -
  51. - SPI0/1
  52. * - GPIO9
  53. -
  54. -
  55. - SPI0/1
  56. * - GPIO10
  57. -
  58. -
  59. - SPI0/1
  60. * - GPIO11
  61. -
  62. -
  63. - SPI0/1
  64. * - GPIO12
  65. - ADC2_CH5
  66. - RTC_GPIO15
  67. - Strapping pin; JTAG
  68. * - GPIO13
  69. - ADC2_CH4
  70. - RTC_GPIO14
  71. - JTAG
  72. * - GPIO14
  73. - ADC2_CH6
  74. - RTC_GPIO16
  75. - JTAG
  76. * - GPIO15
  77. - ADC2_CH3
  78. - RTC_GPIO13
  79. - Strapping pin; JTAG
  80. * - GPIO16
  81. -
  82. -
  83. - SPI0/1
  84. * - GPIO17
  85. -
  86. -
  87. - SPI0/1
  88. * - GPIO18
  89. -
  90. -
  91. -
  92. * - GPIO19
  93. -
  94. -
  95. -
  96. * - GPIO21
  97. -
  98. -
  99. -
  100. * - GPIO22
  101. -
  102. -
  103. -
  104. * - GPIO23
  105. -
  106. -
  107. -
  108. * - GPIO25
  109. - ADC2_CH8
  110. - RTC_GPIO6
  111. -
  112. * - GPIO26
  113. - ADC2_CH9
  114. - RTC_GPIO7
  115. -
  116. * - GPIO27
  117. - ADC2_CH7
  118. - RTC_GPIO17
  119. -
  120. * - GPIO32
  121. - ADC1_CH4
  122. - RTC_GPIO9
  123. -
  124. * - GPIO33
  125. - ADC1_CH5
  126. - RTC_GPIO8
  127. -
  128. * - GPIO34
  129. - ADC1_CH6
  130. - RTC_GPIO4
  131. - GPI
  132. * - GPIO35
  133. - ADC1_CH7
  134. - RTC_GPIO5
  135. - GPI
  136. * - GPIO36
  137. - ADC1_CH0
  138. - RTC_GPIO0
  139. - GPI
  140. * - GPIO37
  141. - ADC1_CH1
  142. - RTC_GPIO1
  143. - GPI
  144. * - GPIO38
  145. - ADC1_CH2
  146. - RTC_GPIO2
  147. - GPI
  148. * - GPIO39
  149. - ADC1_CH3
  150. - RTC_GPIO3
  151. - GPI
  152. .. note::
  153. - Strapping pin: GPIO0, GPIO2, GPIO5, GPIO12 (MTDI), and GPIO15 (MTDO) are strapping pins. For more infomation, please refer to `ESP32 datasheet <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_.
  154. - SPI0/1: GPIO6-11 and GPIO16-17 are usually connected to the SPI flash and PSRAM integrated on the module and therefore should not be used for other purposes.
  155. - JTAG: GPIO12-15 are usually used for inline debug.
  156. - GPI: GPIO34-39 can only be set as input mode and do not have software-enabled pullup or pulldown functions.
  157. - TXD & RXD are usually used for flashing and debugging.
  158. - ADC2: ADC2 pins cannot be used when Wi-Fi is used. So, if you are having trouble getting the value from an ADC2 GPIO while using Wi-Fi, you may consider using an ADC1 GPIO instead, which should solve your problem. For more details, please refer to :ref:`Hardware Limitations of ADC Continuous Mode <hardware_limitations_adc_continuous>` and :ref:`Hardware Limitations of ADC Oneshot Mode <hardware_limitations_adc_oneshot>`.
  159. - Please do not use the interrupt of GPIO36 and GPIO39 when using ADC or Wi-Fi and Bluetooth with sleep mode enabled. Please refer to `ESP32 ECO and Workarounds for Bugs <https://espressif.com/sites/default/files/documentation/eco_and_workarounds_for_bugs_in_esp32_en.pdf>`_ > Section 3.11 for the detailed description of the issue.
  160. .. only:: esp32s2
  161. The {IDF_TARGET_NAME} chip features 43 physical GPIO pins (GPIO0 ~ GPIO21 and GPIO26 ~ GPIO46). Each pin can be used as a general-purpose I/O, or be connected to an internal peripheral signal. Through IO MUX, RTC IO MUX and the GPIO matrix, 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>`__].
  162. The table below provides more information on pin usage, and please note the comments in the table for GPIOs with restrictions.
  163. .. list-table::
  164. :header-rows: 1
  165. :widths: 8 12 12 20
  166. * - GPIO
  167. - Analog Function
  168. - RTC GPIO
  169. - Comment
  170. * - GPIO0
  171. -
  172. - RTC_GPIO0
  173. - Strapping pin
  174. * - GPIO1
  175. - ADC1_CH0
  176. - RTC_GPIO1
  177. -
  178. * - GPIO2
  179. - ADC1_CH1
  180. - RTC_GPIO2
  181. -
  182. * - GPIO3
  183. - ADC1_CH2
  184. - RTC_GPIO3
  185. -
  186. * - GPIO4
  187. - ADC1_CH3
  188. - RTC_GPIO4
  189. -
  190. * - GPIO5
  191. - ADC1_CH4
  192. - RTC_GPIO5
  193. -
  194. * - GPIO6
  195. - ADC1_CH5
  196. - RTC_GPIO6
  197. -
  198. * - GPIO7
  199. - ADC1_CH6
  200. - RTC_GPIO7
  201. -
  202. * - GPIO8
  203. - ADC1_CH7
  204. - RTC_GPIO8
  205. -
  206. * - GPIO9
  207. - ADC1_CH8
  208. - RTC_GPIO9
  209. -
  210. * - GPIO10
  211. - ADC1_CH9
  212. - RTC_GPIO10
  213. -
  214. * - GPIO11
  215. - ADC2_CH0
  216. - RTC_GPIO11
  217. -
  218. * - GPIO12
  219. - ADC2_CH1
  220. - RTC_GPIO12
  221. -
  222. * - GPIO13
  223. - ADC2_CH2
  224. - RTC_GPIO13
  225. -
  226. * - GPIO14
  227. - ADC2_CH3
  228. - RTC_GPIO14
  229. -
  230. * - GPIO15
  231. - ADC2_CH4
  232. - RTC_GPIO15
  233. -
  234. * - GPIO16
  235. - ADC2_CH5
  236. - RTC_GPIO16
  237. -
  238. * - GPIO17
  239. - ADC2_CH6
  240. - RTC_GPIO17
  241. -
  242. * - GPIO18
  243. - ADC2_CH7
  244. - RTC_GPIO18
  245. -
  246. * - GPIO19
  247. - ADC2_CH8
  248. - RTC_GPIO19
  249. -
  250. * - GPIO20
  251. - ADC2_CH9
  252. - RTC_GPIO20
  253. -
  254. * - GPIO21
  255. -
  256. - RTC_GPIO21
  257. -
  258. * - GPIO26
  259. -
  260. -
  261. - SPI0/1
  262. * - GPIO27
  263. -
  264. -
  265. - SPI0/1
  266. * - GPIO28
  267. -
  268. -
  269. - SPI0/1
  270. * - GPIO29
  271. -
  272. -
  273. - SPI0/1
  274. * - GPIO30
  275. -
  276. -
  277. - SPI0/1
  278. * - GPIO31
  279. -
  280. -
  281. - SPI0/1
  282. * - GPIO32
  283. -
  284. -
  285. - SPI0/1
  286. * - GPIO33
  287. -
  288. -
  289. -
  290. * - GPIO34
  291. -
  292. -
  293. -
  294. * - GPIO35
  295. -
  296. -
  297. -
  298. * - GPIO36
  299. -
  300. -
  301. -
  302. * - GPIO37
  303. -
  304. -
  305. -
  306. * - GPIO38
  307. -
  308. -
  309. -
  310. * - GPIO39
  311. -
  312. -
  313. - JTAG
  314. * - GPIO40
  315. -
  316. -
  317. - JTAG
  318. * - GPIO41
  319. -
  320. -
  321. - JTAG
  322. * - GPIO42
  323. -
  324. -
  325. - JTAG
  326. * - GPIO43
  327. -
  328. -
  329. -
  330. * - GPIO44
  331. -
  332. -
  333. -
  334. * - GPIO45
  335. -
  336. -
  337. - Strapping pin
  338. * - GPIO46
  339. -
  340. -
  341. - GPI;Strapping pin
  342. .. note::
  343. - Strapping pin: GPIO0, GPIO45 and GPIO46 are strapping pins. For more infomation, please refer to `ESP32-S2 datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf>`_
  344. - SPI0/1: GPIO26-32 are usually used for SPI flash and PSRAM and not recommended for other uses.
  345. - JTAG: GPIO39-42 are usually used for inline debug.
  346. - GPI: GPIO46 is fixed to pull-down and is input only.
  347. .. only:: esp32c3
  348. The {IDF_TARGET_NAME} chip features 22 physical GPIO pins (GPIO0 ~ GPIO21). Each pin can be used as a general-purpose I/O, or 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>`__].
  349. The table below provides more information on pin usage, and please note the comments in the table for GPIOs with restrictions.
  350. .. list-table::
  351. :header-rows: 1
  352. :widths: 12 12 22
  353. * - GPIO
  354. - Analog Function
  355. - Comment
  356. * - GPIO0
  357. - ADC1_CH0
  358. - RTC
  359. * - GPIO1
  360. - ADC1_CH1
  361. - RTC
  362. * - GPIO2
  363. - ADC1_CH2
  364. - Strapping pin;RTC
  365. * - GPIO3
  366. - ADC1_CH3
  367. - RTC
  368. * - GPIO4
  369. - ADC1_CH4
  370. - RTC
  371. * - GPIO5
  372. - ADC2_CH0
  373. - RTC
  374. * - GPIO6
  375. -
  376. -
  377. * - GPIO7
  378. -
  379. -
  380. * - GPIO8
  381. -
  382. - Strapping pin
  383. * - GPIO9
  384. -
  385. - Strapping pin
  386. * - GPIO10
  387. -
  388. -
  389. * - GPIO11
  390. -
  391. -
  392. * - GPIO12
  393. -
  394. - SPI0/1
  395. * - GPIO13
  396. -
  397. - SPI0/1
  398. * - GPIO14
  399. -
  400. - SPI0/1
  401. * - GPIO15
  402. -
  403. - SPI0/1
  404. * - GPIO16
  405. -
  406. - SPI0/1
  407. * - GPIO17
  408. -
  409. - SPI0/1
  410. * - GPIO18
  411. -
  412. - USB-JTAG
  413. * - GPIO19
  414. -
  415. - USB-JTAG
  416. * - GPIO20
  417. -
  418. -
  419. * - GPIO21
  420. -
  421. -
  422. .. note::
  423. - Strapping pin: GPIO2, GPIO8 and GPIO9 are strapping pins. For more infomation, please refer to `ESP32-C3 datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf>`_.
  424. - SPI0/1: GPIO12-17 are usually used for SPI flash and PSRAM and are not recommended for other uses.
  425. - USB-JTAG: GPIO 18 and 19 are used by USB-JTAG by default. In order to use them as GPIOs, USB-JTAG will be disabled by the drivers.
  426. - RTC: GPIO0-5 can be used when in Deep-sleep mode.
  427. .. only:: esp32s3
  428. The {IDF_TARGET_NAME} chip features 45 physical GPIO pins (GPIO0 ~ GPIO21 and GPIO26 ~ GPIO48). Each pin can be used as a general-purpose I/O, or be connected to an internal peripheral signal. Through GPIO matrix, IO MUX, and RTC IO MUX, peripheral input signals can be from any GPIO pin, and peripheral output signals can be routed to any GPIO pin. 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>`__].
  429. The table below provides more information on pin usage, and please note the comments in the table for GPIOs with restrictions.
  430. .. list-table::
  431. :header-rows: 1
  432. :widths: 8 12 12 20
  433. * - GPIO
  434. - Analog Function
  435. - RTC GPIO
  436. - Comment
  437. * - GPIO0
  438. -
  439. - RTC_GPIO0
  440. - Strapping pin
  441. * - GPIO1
  442. - ADC1_CH0
  443. - RTC_GPIO1
  444. -
  445. * - GPIO2
  446. - ADC1_CH1
  447. - RTC_GPIO2
  448. -
  449. * - GPIO3
  450. - ADC1_CH2
  451. - RTC_GPIO3
  452. - Strapping pin
  453. * - GPIO4
  454. - ADC1_CH3
  455. - RTC_GPIO4
  456. -
  457. * - GPIO5
  458. - ADC1_CH4
  459. - RTC_GPIO5
  460. -
  461. * - GPIO6
  462. - ADC1_CH5
  463. - RTC_GPIO6
  464. -
  465. * - GPIO7
  466. - ADC1_CH6
  467. - RTC_GPIO7
  468. -
  469. * - GPIO8
  470. - ADC1_CH7
  471. - RTC_GPIO8
  472. -
  473. * - GPIO9
  474. - ADC1_CH8
  475. - RTC_GPIO9
  476. -
  477. * - GPIO10
  478. - ADC1_CH9
  479. - RTC_GPIO10
  480. -
  481. * - GPIO11
  482. - ADC2_CH0
  483. - RTC_GPIO11
  484. -
  485. * - GPIO12
  486. - ADC2_CH1
  487. - RTC_GPIO12
  488. -
  489. * - GPIO13
  490. - ADC2_CH2
  491. - RTC_GPIO13
  492. -
  493. * - GPIO14
  494. - ADC2_CH3
  495. - RTC_GPIO14
  496. -
  497. * - GPIO15
  498. - ADC2_CH4
  499. - RTC_GPIO15
  500. -
  501. * - GPIO16
  502. - ADC2_CH5
  503. - RTC_GPIO16
  504. -
  505. * - GPIO17
  506. - ADC2_CH6
  507. - RTC_GPIO17
  508. -
  509. * - GPIO18
  510. - ADC2_CH7
  511. - RTC_GPIO18
  512. -
  513. * - GPIO19
  514. - ADC2_CH8
  515. - RTC_GPIO19
  516. - USB-JTAG
  517. * - GPIO20
  518. - ADC2_CH9
  519. - RTC_GPIO20
  520. - USB-JTAG
  521. * - GPIO21
  522. -
  523. - RTC_GPIO21
  524. -
  525. * - GPIO26
  526. -
  527. -
  528. - SPI0/1
  529. * - GPIO27
  530. -
  531. -
  532. - SPI0/1
  533. * - GPIO28
  534. -
  535. -
  536. - SPI0/1
  537. * - GPIO29
  538. -
  539. -
  540. - SPI0/1
  541. * - GPIO30
  542. -
  543. -
  544. - SPI0/1
  545. * - GPIO31
  546. -
  547. -
  548. - SPI0/1
  549. * - GPIO32
  550. -
  551. -
  552. - SPI0/1
  553. * - GPIO33
  554. -
  555. -
  556. - SPI0/1
  557. * - GPIO34
  558. -
  559. -
  560. - SPI0/1
  561. * - GPIO35
  562. -
  563. -
  564. - SPI0/1
  565. * - GPIO36
  566. -
  567. -
  568. - SPI0/1
  569. * - GPIO37
  570. -
  571. -
  572. - SPI0/1
  573. * - GPIO38
  574. -
  575. -
  576. -
  577. * - GPIO39
  578. -
  579. -
  580. -
  581. * - GPIO40
  582. -
  583. -
  584. -
  585. * - GPIO41
  586. -
  587. -
  588. -
  589. * - GPIO42
  590. -
  591. -
  592. -
  593. * - GPIO43
  594. -
  595. -
  596. -
  597. * - GPIO44
  598. -
  599. -
  600. -
  601. * - GPIO45
  602. -
  603. -
  604. - Strapping pin
  605. * - GPIO46
  606. -
  607. -
  608. - Strapping pin
  609. * - GPIO47
  610. -
  611. -
  612. -
  613. * - GPIO48
  614. -
  615. -
  616. -
  617. .. Note::
  618. - Strapping pin: GPIO0, GPIO3, GPIO45 and GPIO46 are strapping pins. For more infomation, please refer to `ESP32-S3 datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf>`_.
  619. - SPI0/1: GPIO26-32 are usually used for SPI flash and PSRAM and not recommended for other uses. When using Octal Flash or Octal PSRAM or both, GPIO33~37 are connected to SPIIO4 ~ SPIIO7 and SPIDQS. Therefore, on boards embedded with ESP32-S3R8 / ESP32-S3R8V chip, GPIO33~37 are also not recommended for other uses.
  620. - USB-JTAG: GPIO 19 and 20 are used by USB-JTAG by default. In order to use them as GPIOs, USB-JTAG will be disabled by the drivers.
  621. .. only:: esp32c2
  622. 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.
  623. 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>`__].
  624. The table below provides more information on pin usage, and please note the comments in the table for GPIOs with restrictions.
  625. .. list-table::
  626. :header-rows: 1
  627. :widths: 12 12 22
  628. * - GPIO
  629. - Analog Function
  630. - Comment
  631. * - GPIO0
  632. - ADC1_CH0
  633. - RTC
  634. * - GPIO1
  635. - ADC1_CH1
  636. - RTC
  637. * - GPIO2
  638. - ADC1_CH2
  639. - RTC
  640. * - GPIO3
  641. - ADC1_CH3
  642. - RTC
  643. * - GPIO4
  644. - ADC1_CH4
  645. - RTC
  646. * - GPIO5
  647. -
  648. - RTC
  649. * - GPIO6
  650. -
  651. -
  652. * - GPIO7
  653. -
  654. -
  655. * - GPIO8
  656. -
  657. - Strapping pin
  658. * - GPIO9
  659. -
  660. - Strapping pin
  661. * - GPIO10
  662. -
  663. -
  664. * - GPIO11
  665. -
  666. -
  667. * - GPIO12
  668. -
  669. - SPI0/1
  670. * - GPIO13
  671. -
  672. - SPI0/1
  673. * - GPIO14
  674. -
  675. - SPI0/1
  676. * - GPIO15
  677. -
  678. - SPI0/1
  679. * - GPIO16
  680. -
  681. - SPI0/1
  682. * - GPIO17
  683. -
  684. - SPI0/1
  685. * - GPIO18
  686. -
  687. -
  688. * - GPIO19
  689. -
  690. -
  691. * - GPIO20
  692. -
  693. -
  694. .. note::
  695. - Strapping pin: GPIO8 and GPIO9 are strapping pins. For more infomation, please refer to `ESP8684 datasheet <https://www.espressif.com/sites/default/files/documentation/esp8684_datasheet_en.pdf>`_.
  696. - SPI0/1: GPIO12-17 are usually used for SPI flash and not recommended for other uses.
  697. - RTC: GPIO0-5 can be used when in Deep-sleep mode.
  698. .. only:: SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
  699. 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:
  700. .. list::
  701. - In Deep-sleep mode
  702. :SOC_ULP_SUPPORTED: - The :doc:`Ultra Low Power co-processor <../../api-reference/system/ulp>` is running
  703. - Analog functions such as ADC/DAC/etc are in use.
  704. Application Example
  705. -------------------
  706. GPIO output and input interrupt example: :example:`peripherals/gpio/generic_gpio`.
  707. API Reference - Normal GPIO
  708. ---------------------------
  709. .. include-build-file:: inc/gpio.inc
  710. .. include-build-file:: inc/gpio_types.inc
  711. .. only:: SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
  712. API Reference - RTC GPIO
  713. ------------------------
  714. .. include-build-file:: inc/rtc_io.inc
  715. .. include-build-file:: inc/rtc_io_types.inc