Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| pmod:pmodesp32:reference-manual [2022/09/13 18:02] – changed forum.digilentinc.com to forum.digilent.com jeff.greenberg_ni.com | pmod:pmodesp32:reference-manual [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Pmod ESP32 Reference Manual ====== | ||
| + | The Digilent Pmod ESP32 features a radio with support for 802.11 b/g/n Wifi and dual-mode Bluetooth. This module is perfect for connecting your FPGA or microcontroller projects to your home network, the internet, or any bluetooth hardware. The Pmod ESP32 contains a Tensilica Xtensa microprocessor, | ||
| + | |||
| + | {{Digilent Image Gallery | ||
| + | | image = {{: | ||
| + | | image = {{: | ||
| + | | image = {{: | ||
| + | | image = {{: | ||
| + | }} | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Features ===== | ||
| + | * Full 802.11 b/g/n WiFi stack with support for TCP, UDP, and SSL connections | ||
| + | * Connect to WiFi networks or broadcast your own as a server or a client | ||
| + | * Bluetooth v4.2 BR/EDR and BLE compatibility | ||
| + | * One UART port for system debugging and application flashing | ||
| + | * One programmable on-board LED | ||
| + | * Two customizable GPIO pins | ||
| + | * 20.5 dBm output power at the antenna | ||
| + | * User button for resetting the processor after a mode switch | ||
| + | * User switch for toggling between UART and SPI communication | ||
| + | * Low power sleep mode for battery powered applications | ||
| + | * 12-pin Pmod connector with SPI and UART interfaces | ||
| + | * Follows Digilent {{/ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== Specifications ====== | ||
| + | ==== Pinout Table Diagram ==== | ||
| + | ^ Pin ^ Signal | ||
| + | | 1 | RTS / SS | ||
| + | | 2 | RXD / MOSI | ||
| + | | 3 | TXD / MISO | ||
| + | | 4 | CTS / SCK | UART Clear to Send / SPI Serial Clock | | ||
| + | | 5 | GND | Power Supply Ground | ||
| + | | 6 | VCC | Power Supply (3.3V) | ||
| + | | 7 | INT | Configurable GPIO / IO2 | | ||
| + | | 8 | EN | ||
| + | | 9 | SELECT | ||
| + | | 10 | ||
| + | | 11 | ||
| + | | 12 | ||
| + | |||
| + | ==== Power Specifications ==== | ||
| + | ^ Parameter | ||
| + | | VDD | 2.7 | 3.3 | 3.6 | | ||
| + | |||
| + | ==== UART/SPI Clock Specifications ==== | ||
| + | ^ Parameter | ||
| + | | SPI Serial Clock Frequency | ||
| + | | UART Serial Clock Frequency | ||
| + | |||
| + | ==== Radio Specifications ==== | ||
| + | ^ Parameter | ||
| + | | 802.11 Max Data Rate | ||
| + | | Bluetooth HCI Max Data Rate | 4 | Mbps | | ||
| + | //Note: Actual radio throughput is dependent on a number of factors including antenna type, operating environment, | ||
| + | |||
| + | ==== Physical Dimensions ==== | ||
| + | * PCB Length: 2.00 in. (5.08 cm) | ||
| + | * PCB Width: 0.80 in. (2.03 cm) | ||
| + | |||
| + | //Note: Dimensions do not include the length of the Pmod header pins. The ESP32 antenna overhangs the PCB by 1/ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ====== Functional Description ====== | ||
| + | |||
| + | The Pmod ESP32 integrates WiFi and Bluetooth 4.2 solutions on a single chip along with dual high performance cores and several peripherals. The ESP32 possesses the ability to connect to an existing WiFi network or broadcast its own as an access point. | ||
| + | |||
| + | The Pmod ESP32 has the ability to operate in slave mode using the UART interface on the top row of pins. In slave mode, the device responds to a specific set of AT commands. More information about the AT command firmware can be found here: [[https:// | ||
| + | |||
| + | The Pmod also has the ability to operate in stand alone mode. In stand alone mode, the user can write custom applications for the ESP 32. Custom applications can interface with the otherwise unused SPI interface and program the two GPIOs in the bottom row of pins. To send the new application to the ESP32, the user can modify the switches and use the UART that is connected to the J2 header to both flash and monitor the device. | ||
| + | |||
| + | ==== Switches ==== | ||
| + | The %%Pmod ESP32%% has two switches. SW1.1 (labeled " | ||
| + | |||
| + | SW1.2 (labeled " | ||
| + | |||
| + | The behavior of SW1.1 can be controlled by a host board by using the " | ||
| + | |||
| + | ==== Pmod ESP32 Switch Behaviors ==== | ||
| + | ^ Switch | ||
| + | | SW1.1 (SPI) | ||
| + | | SW1.1 (SPI) | ||
| + | | SW1.2 (BOOT) | ||
| + | | SW1.2 (BOOT) | ||
| + | |||
| + | ==== Reset Button ==== | ||
| + | After flashing the device with a new application, | ||
| + | |||
| + | The behavior of BTN1 can be controlled by a host board by using the " | ||
| + | |||
| + | ==== On-board LED ==== | ||
| + | The Pmod ESP32 contains an on-board LED that can be directly programmed by the user. The LED (LD0) is connected to IO12 on the ESP32. When using the AT firmware, LD0 cannot be directly controlled by the user. However, LD0 can be programmed by writing custom applications for, and flashing, the ESP32. | ||
| + | |||
| + | ====AT Command (Slave) Mode==== | ||
| + | The Pmod ESP32 is delivered to users in slave mode. In slave mode, the top row of pins are mapped to their UART functionality. It is important that switches SW1.1 and SW1.2 are both in the off position when power is applied to the device. Once power has been applied, the value of SW1.2 is arbitrary. However, SW1.1 must remain in the off position during the duration of operation in slave mode. | ||
| + | |||
| + | In slave mode, commands of a specific format (referred to as AT commands hereafter) are passed to the Pmod via the UART interface on the top row of pins. The UART interface on the Pmod is initially set to function at 115200 baud with 8 data bits, 1 stop bit, and no parity or hardware flow control. The settings of the UART interface can be modified by using specific AT commands later. | ||
| + | |||
| + | AT commands must always be followed by a carriage return and newline character, in that order. For example, the AT command " | ||
| + | |||
| + | A very sparse table of some AT commands is shown below. For the full list of supported AT commands, please visit the [[http:// | ||
| + | |||
| + | Carriage return and line feed bytes are omitted for clarity. | ||
| + | ^ Command | ||
| + | |AT | ||
| + | |AT+RST | ||
| + | |AT+GMR | ||
| + | |AT+CWMODE | ||
| + | |AT+CWMODE | ||
| + | |AT+CWJAP | ||
| + | |AT+CWJAP | ||
| + | |AT+CWLAP | ||
| + | |||
| + | ==== Standalone Mode ==== | ||
| + | The Pmod ESP32 features an Xtensa dual-core 32-bit LX5 microprocessor. The Pmod is delivered to customers with the AT Instruction firmware pre-loaded onto it. However, the user can write custom applications for the ESP32, flash them to the Pmod, and operate the device outside of slave mode. | ||
| + | |||
| + | Some reasons to use custom firmware rather than the AT firmware might be: | ||
| + | * The user would like functionality and behavior that are not limited by the UART baud rate | ||
| + | * The user would like to make use of the SPI peripheral | ||
| + | * The user would like to make use of the programmable GPIOs and LED | ||
| + | * The user wishes to use the SDK provided by Espressif rather than the AT command set | ||
| + | * The user wishes to use components on the ESP32 such as PWM, ADC, DMA, I2C, DAC, etc | ||
| + | |||
| + | The SDK provided by Espressif contains all of the functionality of the AT command set in slave mode, but with much more control of timing and operation, and with additional control of peripherals that are not accessible in slave mode. | ||
| + | |||
| + | In order to write custom applications for the Pmod, a couple of tools are needed: | ||
| + | * The Xtensa Toolchain | ||
| + | * The Espressif ESP-IDF | ||
| + | * Python | ||
| + | * A USB-UART bridge device such as the [[reference/ | ||
| + | |||
| + | To get started with setting up the tools for building projects for the Pmod ESP32, please reference [[http:// | ||
| + | |||
| + | When connecting to the Pmod to flash a custom application to it, utilize the UART port on top of the Pmod (Pmod header J2), rather than the UART interface on Pmod header J1. Additionally, | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ======Quick Start====== | ||
| + | ===Prerequisites=== | ||
| + | * A Pmod ESP32 with the out-of-box AT firmware | ||
| + | * A serial terminal program such as minicom, screen, CoolTerm, or Putty | ||
| + | * A UART controller for interfacing with the Pmod. This UART controller can be anything like a Digilent FPGA board with a UART controller instantiated in the FPGA, or a Raspberry Pi or BeagleBone Black. | ||
| + | * The UART Controller TX line connected to pin 2 | ||
| + | * The UART Controller RX line connected to pin 3 | ||
| + | * A shared GND connection between the Pmod and your UART controller | ||
| + | * 3.3v Power connected to the Pmod | ||
| + | |||
| + | |||
| + | ===Step By Step=== | ||
| + | - Make the hardware connections described above | ||
| + | - Apply power to the Pmod ESP32 | ||
| + | - Note the port that the Pmod is connected to | ||
| + | - For Linux, this will be / | ||
| + | - For MacOS, this will be / | ||
| + | - For Windows, this will be COM* | ||
| + | - If you are using an FPGA as your UART controller, disregard this step, but if there is more than one UART controller in your design, note which UART controller is connected to the Pmod ESP32 | ||
| + | - Set the serial terminal (Putty, Minicom, CoolTerm) to use 115200 baud with 8 data bits, 1 stop bit, no parity | ||
| + | - Send the characters " | ||
| + | - In your terminal, you should see the Pmod echo back your " | ||
| + | - You are now set to send AT commands to your Pmod ESP32. Try to connect it to your local wireless network by sending the command AT+CWJAP=" | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== Additional Information ====== | ||
| + | |||
| + | The schematics of the %%Pmod ESP32%% are available {{reference: | ||
| + | |||
| + | Links to a couple of example projects featuring the %%Pmod ESP32%% can be found on its Resource Center [[pmod: | ||
| + | |||
| + | If you have any questions or comments about the %%Pmod ESP32%%, feel free to post them under the appropriate section (" | ||
| + | |||
| + | ---- | ||
| + | |||
| + | {{tag> | ||

