get-started-ethernet-kit.rst 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. ESP32-Ethernet-Kit V1.2 Getting Started Guide
  2. =============================================
  3. :link_to_translation:`zh_CN:[中文]`
  4. This guide shows how to get started with the ESP32-Ethernet-Kit development board and also provides information about its functionality and configuration options.
  5. The :ref:`ESP32-Ethernet-Kit <get-started-esp32-ethernet-kit-v1.2>` is an Ethernet-to-Wi-Fi development board that enables Ethernet devices to be interconnected over Wi-Fi. At the same time, to provide more flexible power supply options, the ESP32-Ethernet-Kit also supports power over Ethernet (PoE).
  6. .. _get-started-esp32-ethernet-kit-v1.2-overview:
  7. .. figure:: ../../../_static/esp32-ethernet-kit-v1.2-overview.png
  8. :align: center
  9. :scale: 80%
  10. :alt: ESP32-Ethernet-Kit V1.2
  11. :figclass: align-center
  12. ESP32-Ethernet-Kit V1.2 Overview (click to enlarge)
  13. What You Need
  14. -------------
  15. * :ref:`ESP32-Ethernet-Kit V1.2 board <get-started-esp32-ethernet-kit-v1.2>`
  16. * USB 2.0 A to Micro B Cable
  17. * Computer running Windows, Linux, or macOS
  18. You can skip the introduction sections and go directly to Section `Start Application Development`_.
  19. Overview
  20. --------
  21. ESP32-Ethernet-Kit is an ESP32-based development board produced by `Espressif <https://espressif.com>`_.
  22. It consists of two development boards, the Ethernet board A and the PoE board B. The :ref:`Ethernet board (A) <get-started-esp32-ethernet-kit-a-v1.2-layout>` contains Bluetooth/Wi-Fi dual-mode ESP32-WROVER-E module and IP101GRI, a Single Port 10/100 Fast Ethernet Transceiver (PHY). The `PoE board (B)`_ provides power over Ethernet functionality. The A board can work independently, without the board B installed.
  23. .. _get-started-esp32-ethernet-kit-v1.2:
  24. .. figure:: ../../../_static/esp32-ethernet-kit-v1.2.jpg
  25. :align: center
  26. :scale: 80%
  27. :alt: ESP32-Ethernet-Kit V1.2
  28. :figclass: align-center
  29. ESP32-Ethernet-Kit V1.2 (click to enlarge)
  30. For the application loading and monitoring, the Ethernet board (A) also features FTDI FT2232H chip - an advanced multi-interface USB bridge. This chip enables to use JTAG for direct debugging of ESP32 through the USB interface without a separate JTAG debugger.
  31. Functionality Overview
  32. ----------------------
  33. The block diagram below shows the main components of ESP32-Ethernet-Kit and their interconnections.
  34. .. figure:: ../../../_static/esp32-ethernet-kit-v1.1-block-diagram.png
  35. :align: center
  36. :scale: 60%
  37. :alt: ESP32-Ethernet-Kit block diagram (click to enlarge)
  38. :figclass: align-center
  39. ESP32-Ethernet-Kit block diagram (click to enlarge)
  40. Functional Description
  41. ----------------------
  42. The following figures and tables describe the key components, interfaces, and controls of the ESP32-Ethernet-Kit.
  43. .. _get-started-esp32-ethernet-kit-a-v1.2-layout:
  44. Ethernet Board (A)
  45. ^^^^^^^^^^^^^^^^^^
  46. .. figure:: ../../../_static/esp32-ethernet-kit-a-v1.2-layout.jpg
  47. :align: center
  48. :scale: 80%
  49. :alt: ESP32-Ethernet-Kit V1.2 (click to enlarge)
  50. :figclass: align-center
  51. ESP32-Ethernet-Kit - Ethernet board (A) layout (click to enlarge)
  52. The table below provides description starting from the picture's top right corner and going clockwise.
  53. ================== ===========================================================================
  54. Key Component Description
  55. ================== ===========================================================================
  56. ESP32-WROVER-E This ESP32 module features 64-Mbit PSRAM for flexible extended storage and data processing capabilities.
  57. GPIO Header 2 Five unpopulated through-hole solder pads to provide access to selected GPIOs of ESP32. For details, see `GPIO Header 2`_.
  58. Function Switch A 4-bit DIP switch used to configure the functionality of selected GPIOs of ESP32. For details see `Function Switch`_.
  59. Tx/Rx LEDs Two LEDs to show the status of UART transmission.
  60. FT2232H The FT2232H chip serves as a multi-protocol USB-to-serial bridge which can be programmed and controlled via USB to provide communication with ESP32. FT2232H also features USB-to-JTAG interface which is available on channel A of the chip, while USB-to-serial is on channel B. The FT2232H chip enhances user-friendliness in terms of application development and debugging. See `ESP32-Ethernet-Kit V1.2 Ethernet board (A) schematic`_.
  61. USB Port USB interface. Power supply for the board as well as the communication interface between a computer and the board.
  62. Power Switch Power On/Off Switch. Toggling the switch to **5V0** position powers the board on, toggling to **GND** position powers the board off.
  63. 5V Input The 5V power supply interface can be more convenient when the board is operating autonomously (not connected to a computer).
  64. 5V Power On LED This red LED turns on when power is supplied to the board, either from USB or 5V Input.
  65. DC/DC Converter Provided DC 5 V to 3.3 V conversion, output current up to 2 A.
  66. Board B Connectors A pair male and female header pins for mounting the `PoE board (B)`_.
  67. IP101GRI (PHY) The physical layer (PHY) connection to the Ethernet cable is implemented using the `IP101GRI <http://www.bdtic.com/DataSheet/ICplus/IP101G_DS_R01_20121224.pdf>`_ chip. The connection between PHY and ESP32 is done through the reduced media-independent interface (RMII), a variant of the media-independent interface `(MII) <https://en.wikipedia.org/wiki/Media-independent_interface>`_ standard. The PHY supports the IEEE 802.3/802.3u standard of 10/100 Mbps.
  68. RJ45 Port Ethernet network data transmission port.
  69. Magnetics Module The Magnetics are part of the Ethernet specification to protect against faults and transients, including rejection of common mode signals between the transceiver IC and the cable. The magnetics also provide galvanic isolation between the transceiver and the Ethernet device.
  70. Link/Activity LEDs Two LEDs (green and red) that respectively indicate the "Link" and "Activity" statuses of the PHY.
  71. BOOT Button Download button. Holding down **BOOT** and then pressing **EN** initiates Firmware Download mode for downloading firmware through the serial port.
  72. EN Button Reset button.
  73. GPIO Header 1 This header provides six unpopulated through-hole solder pads connected to spare GPIOs of ESP32. For details, see `GPIO Header 1`_.
  74. ================== ===========================================================================
  75. .. note::
  76. Automatic firmware download is supported. If following steps and using software described in Section `Start Application Development`_, users don't need to do any operation with BOOT button or EN button.
  77. PoE Board (B)
  78. ^^^^^^^^^^^^^
  79. This board coverts power delivered over the Ethernet cable (PoE) to provide a power supply for the Ethernet board (A). The main components of the PoE board (B) are shown on the block diagram under `Functionality Overview`_.
  80. The PoE board (B) has the following features:
  81. * Support for IEEE 802.3at
  82. * Power output: 5 V, 1.4 A
  83. To take advantage of the PoE functionality the **RJ45 Port** of the Ethernet board (A) should be connected with an Ethernet cable to a switch that supports PoE. When the Ethernet board (A) detects 5 V power output from the PoE board (B), the USB power will be automatically cut off.
  84. .. figure:: ../../../_static/esp32-ethernet-kit-b-v1.0-layout.png
  85. :align: center
  86. :scale: 80%
  87. :alt: ESP32-Ethernet-Kit - PoE board (B)
  88. :figclass: align-center
  89. ESP32-Ethernet-Kit - PoE board (B) layout (click to enlarge)
  90. .. list-table:: Table PoE board (B)
  91. :widths: 40 150
  92. :header-rows: 1
  93. * - Key Component
  94. - Description
  95. * - Board A Connector
  96. - Four female (left) and four male (right) header pins for connecting the PoE board (B) to :ref:`Ethernet board (A) <get-started-esp32-ethernet-kit-a-v1.2-layout>`. The pins on the left accept power coming from a PoE switch. The pins on the right deliver 5 V power supply to the Ethernet board (A).
  97. * - External Power Terminals
  98. - Optional power supply (26.6 ~ 54 V) to the PoE board (B).
  99. .. _get-started-esp32-ethernet-kit-v1.2-setup-options:
  100. Setup Options
  101. -------------
  102. This section describes options to configure the ESP32-Ethernet-Kit hardware.
  103. Function Switch
  104. ^^^^^^^^^^^^^^^
  105. When in On position, this DIP switch is routing listed GPIOs to FT2232H to provide JTAG functionality. When in Off position, the GPIOs may be used for other purposes.
  106. ======= ================
  107. DIP SW GPIO Pin
  108. ======= ================
  109. 1 GPIO13
  110. 2 GPIO12
  111. 3 GPIO15
  112. 4 GPIO14
  113. ======= ================
  114. RMII Clock Selection
  115. ^^^^^^^^^^^^^^^^^^^^
  116. The ethernet MAC and PHY under RMII working mode need a common 50 MHz reference clock (i.e. RMII clock) that can be provided either externally, or generated from internal ESP32 APLL (not recommended).
  117. .. note::
  118. For additional information on the RMII clock selection, please refer to `ESP32-Ethernet-Kit V1.2 Ethernet board (A) schematic`_, sheet 2, location D2.
  119. RMII Clock Sourced Externally by PHY
  120. """"""""""""""""""""""""""""""""""""
  121. By default, the ESP32-Ethernet-Kit is configured to provide RMII clock for the IP101GRI PHY's 50M_CLKO output. The clock signal is generated by the frequency multiplication of 25 MHz crystal connected to the PHY. For details, please see the figure below.
  122. .. figure:: ../../../_static/esp32-ethernet-kit-rmii-clk-from-phy.png
  123. :align: center
  124. :scale: 80%
  125. :alt: RMII Clock from IP101GRI PHY
  126. :figclass: align-center
  127. RMII Clock from IP101GRI PHY
  128. Please note that the PHY is reset on power up by pulling the RESET_N signal down with a resistor. ESP32 should assert RESET_N high with GPIO5 to enable PHY. Only this can ensure the power-up of system. Otherwise ESP32 may enter download mode (when the clock signal of REF_CLK_50M is at a high logic level during the GPIO0 power-up sampling phase).
  129. RMII Clock Sourced Internally from ESP32's APLL
  130. """""""""""""""""""""""""""""""""""""""""""""""
  131. Another option is to source the RMII Clock from internal ESP32 APLL, see figure below. The clock signal coming from GPIO0 is first inverted, to account for transmission line delay, and then supplied to the PHY.
  132. .. figure:: ../../../_static/esp32-ethernet-kit-rmii-clk-to-phy.png
  133. :align: center
  134. :scale: 80%
  135. :alt: RMII Clock from ESP Internal APLL
  136. :figclass: align-center
  137. RMII Clock from ESP Internal APLL
  138. To implement this option, users need to remove or add some RC components on the board. For details please refer to `ESP32-Ethernet-Kit V1.2 Ethernet board (A) schematic`_, sheet 2, location D2. Please note that if the APLL is already used for other purposes (e.g. I2S peripheral), then you have no choice but use an external RMII clock.
  139. GPIO Allocation
  140. ---------------
  141. This section describes allocation of ESP32 GPIOs to specific interfaces or functions of the ESP32-Ethernet-Kit.
  142. IP101GRI (PHY) Interface
  143. ^^^^^^^^^^^^^^^^^^^^^^^^
  144. The allocation of the ESP32 (MAC) pins to IP101GRI (PHY) is shown in the table below. Implementation of ESP32-Ethernet-Kit defaults to Reduced Media-Independent Interface (RMII).
  145. ==== ================ ===============
  146. No. ESP32 Pin (MAC) IP101GRI (PHY)
  147. ==== ================ ===============
  148. *RMII Interface*
  149. ---------------------------------------
  150. 1 GPIO21 TX_EN
  151. 2 GPIO19 TXD[0]
  152. 3 GPIO22 TXD[1]
  153. 4 GPIO25 RXD[0]
  154. 5 GPIO26 RXD[1]
  155. 6 GPIO27 CRS_DV
  156. 7 GPIO0 REF_CLK
  157. ---- ---------------- ---------------
  158. *Serial Management Interface*
  159. ---------------------------------------
  160. 8 GPIO23 MDC
  161. 9 GPIO18 MDIO
  162. ---- ---------------- ---------------
  163. *PHY Reset*
  164. ---------------------------------------
  165. 10 GPIO5 Reset_N
  166. ==== ================ ===============
  167. .. note::
  168. The allocation of all pins under the ESP32's *RMII Interface* is fixed and cannot be changed either through IO MUX or GPIO Matrix. REF_CLK can only be selected from GPIO0, GPIO16 or GPIO17 and it can not be changed through GPIO Matrix.
  169. GPIO Header 1
  170. ^^^^^^^^^^^^^
  171. This header exposes some GPIOs that are not used elsewhere on the ESP32-Ethernet-Kit.
  172. ==== ================
  173. No. ESP32 Pin
  174. ==== ================
  175. 1 GPIO32
  176. 2 GPIO33
  177. 3 GPIO34
  178. 4 GPIO35
  179. 5 GPIO36
  180. 6 GPIO39
  181. ==== ================
  182. GPIO Header 2
  183. ^^^^^^^^^^^^^
  184. This header contains GPIOs that may be used for other purposes depending on scenarios described in column "Comments".
  185. ==== ========== ====================
  186. No. ESP32 Pin Comments
  187. ==== ========== ====================
  188. 1 GPIO17 See note 1
  189. 2 GPIO16 See note 1
  190. 3 GPIO4
  191. 4 GPIO2
  192. 5 GPIO13 See note 2
  193. 6 GPIO12 See note 2
  194. 7 GPIO15 See note 2
  195. 8 GPIO14 See note 2
  196. 9 GND Ground
  197. 10 3V3 3.3 V power supply
  198. ==== ========== ====================
  199. .. note::
  200. 1. The ESP32 pins GPIO16 and GPIO17 are not broken out to the ESP32-WROVER-E module and therefore not available for use. If you need to use these pins, please solder a module without PSRAM memory inside, e.g. the ESP32-WROOM-32D or ESP32-SOLO-1.
  201. 2. Functionality depends on the settings of the `Function Switch`_.
  202. GPIO Allocation Summary
  203. ^^^^^^^^^^^^^^^^^^^^^^^
  204. .. csv-table::
  205. :header: ESP32-WROVER-E,IP101GRI,UART,JTAG,GPIO,Comments
  206. S_VP,,,,IO36,
  207. S_VN,,,,IO39,
  208. IO34,,,,IO34,
  209. IO35,,,,IO35,
  210. IO32,,,,IO32,
  211. IO33,,,,IO33,
  212. IO25,RXD[0],,,,
  213. IO26,RXD[1],,,,
  214. IO27,CRS_DV,,,,
  215. IO14,,,TMS,IO14,
  216. IO12,,,TDI,IO12,
  217. IO13,,,TCK,IO13,
  218. IO15,,,TDO,IO15,
  219. IO2,,,,IO2,
  220. IO0,REF_CLK,,,,See note 1
  221. IO4,,,,IO4,
  222. IO16,,,,IO16 (NC),See note 2
  223. IO17,,,,IO17 (NC),See note 2
  224. IO5,Reset_N,,,,See note 1
  225. IO18,MDIO,,,,
  226. IO19,TXD[0],,,,
  227. IO21,TX_EN,,,,
  228. RXD0,,RXD,,,
  229. TXD0,,TXD,,,
  230. IO22,TXD[1],,,,
  231. IO23,MDC,,,,
  232. .. note::
  233. 1. To prevent the power-on state of the GPIO0 from being affected by the clock output on the PHY side, the RESET_N signal to PHY defaults to low, turning the clock output off. After power-on you can control RESET_N with GPIO5 to turn the clock output on. See also `RMII Clock Sourced Externally by PHY`_. For PHYs that cannot turn off the clock output through RESET_N, it is recommended to use a crystal module that can be disabled/enabled externally. Similarly like when using RESET_N, the oscillator module should be disabled by default and turned on by ESP32 after power-up. For a reference design please see `ESP32-Ethernet-Kit V1.2 Ethernet board (A) schematic`_.
  234. 2. The ESP32 pins GPIO16 and GPIO17 are not broken out to the ESP32-WROVER-E module and therefore not available for use. If you need to use these pins, please solder a module without PSRAM memory inside, e.g. the ESP32-WROOM-32D or ESP32-SOLO-1.
  235. Start Application Development
  236. -----------------------------
  237. Before powering up your ESP32-Ethernet-Kit, please make sure that the board is in good condition with no obvious signs of damage.
  238. Initial Setup
  239. ^^^^^^^^^^^^^
  240. 1. Set the **Function Switch** on the :ref:`Ethernet board (A) <get-started-esp32-ethernet-kit-a-v1.2-layout>` to its default position by turning all the switches to **ON**.
  241. 2. To simplify flashing and testing of the application, do not input extra signals to the board headers.
  242. 3. The `PoE board (B)`_ can now be plugged in, but do not connect external power to it.
  243. 4. Connect the :ref:`Ethernet board (A) <get-started-esp32-ethernet-kit-a-v1.2-layout>` to the PC with a USB cable.
  244. 5. Turn the **Power Switch** from GND to 5V0 position, the **5V Power On LED** should light up.
  245. Now to Development
  246. ^^^^^^^^^^^^^^^^^^
  247. Proceed to :doc:`../../get-started/index`, where Section :ref:`get-started-step-by-step` will quickly help you set up the development environment and then flash an example project onto your board.
  248. Move on to the next section only if you have successfully completed all the above steps.
  249. Configure and Load the Ethernet Example
  250. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  251. After setting up the development environment and testing the board, you can configure and flash the :example:`ethernet/basic` example. This example has been created for testing Ethernet functionality. It supports different PHY, including **IP101GRI** installed on :ref:`get-started-esp32-ethernet-kit-v1.2`.
  252. Summary of Changes from ESP32-Ethernet-Kit V1.1
  253. -----------------------------------------------
  254. * Correct the placement of GPIO pin number marking on the board’s silkscreen besides the DIP switch.
  255. * Values of C1, C2, C42, and C43 are updated to 20 pF. For more information, please check `ESP32-Ethernet-Kit V1.2 Ethernet board (A) schematic`_.
  256. * Replace ESP32-WROVER-B with ESP32-WROVER-E.
  257. Other Versions of ESP32-Ethernet-Kit
  258. ------------------------------------
  259. * :doc:`get-started-ethernet-kit-v1.0`
  260. * :doc:`get-started-ethernet-kit-v1.1`
  261. Related Documents
  262. -----------------
  263. * `ESP32-Ethernet-Kit V1.2 Ethernet Board (A) Schematic`_ (PDF)
  264. * `ESP32-Ethernet-Kit PoE Board (B) Schematic`_ (PDF)
  265. * `ESP32-Ethernet-Kit V1.2 Ethernet Board (A) PCB Layout <https://dl.espressif.com/dl/schematics/PCB_ESP32-Ethernet-Kit_A_V1_2_20190829.pdf>`_ (PDF)
  266. * `ESP32-Ethernet-Kit PoE Board (B) PCB Layout <https://dl.espressif.com/dl/schematics/PCB_ESP32-Ethernet-Kit_B_V1_0_20190306.pdf>`_ (PDF)
  267. * `ESP32 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf>`_ (PDF)
  268. * `ESP32-WROVER-E Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf>`_ (PDF)
  269. * :doc:`../../api-guides/jtag-debugging/index`
  270. * :doc:`../../hw-reference/index`
  271. For other design documentation for the board, please contact us at sales@espressif.com.
  272. .. _ESP32-Ethernet-Kit V1.1 Ethernet board (A) schematic: https://dl.espressif.com/dl/schematics/SCH_ESP32-ETHERNET-KIT_A_V1.1_20190711.pdf
  273. .. _ESP32-Ethernet-Kit PoE board (B) schematic: https://dl.espressif.com/dl/schematics/SCH_ESP32-ETHERNET-KIT_B_V1.0_20190517.pdf
  274. .. _ESP32-Ethernet-Kit V1.0 Ethernet board (A) schematic: https://dl.espressif.com/dl/schematics/SCH_ESP32-ETHERNET-KIT_A_V1.0_20190517.pdf
  275. .. _ESP32-Ethernet-Kit V1.2 Ethernet board (A) schematic: https://dl.espressif.com/dl/schematics/SCH_ESP32-Ethernet-Kit_A_V1.2_20200528.pdf
  276. .. toctree::
  277. :hidden:
  278. get-started-ethernet-kit-v1.0.rst
  279. get-started-ethernet-kit-v1.1.rst