seeed studio Digi-Key Electronics Spartan Edge Accelerate... User manual

Spartan Edge Accelerate Board Development Manual---ESP32
Part
1 / 47
SEA Board Manual
– Esp32 Part
DIGI-KEY ELECTRONICS & Seeed Studio
ACADEMIC COMPONENT
REFERENCE GUIDE

Spartan Edge Accelerate Board Development Manual---ESP32
Part
2 / 47
Spartan Edge Accelerate Board
Development Manual
— ESP32 Part
Revision V1.0
September 15,2020
Written by:
Contributed by:

Spartan Edge Accelerate Board Development Manual---ESP32
Part
3 / 47
Revision history
The following table shows the revision history of this document
Date
Version
Revised content
September 15,2020
1.0
Create the document

Spartan Edge Accelerate Board Development Manual---ESP32
Part
4 / 47
Preview
Shenzhen Seeed Technology Co.,Ltd. in cooperation with Southeast University and Southwest Jiaotong University,
developed the Spartan Edge Accelerate Board (abbrev.SEA-Board), based on Xilinx Spartan-7 Series FPGA Chip
(xc7s15ftgb196- 1).
In order to understand the SEA development platform more quickly, we have released 3 manuals (ESP32 Part,
FPGA Part, and Comprehensive Experiment Part) that support entry-level development. Regardless of whether
you have the relevant development foundation or not, you can easily learn FPGA by studying this series of
development manuals.
Fig.1-1 Top view of the SEA development platform

Spartan Edge Accelerate Board Development Manual---ESP32
Part
5 / 47
About the Board
Spartan Edge Accelerator Board (Spartan Edge Accelerator Board, hereinafter referred to as SEA) is a Xilinx
Spartan FPGA development board with Arduino UNO interface. It can be used as an FPGA expansion board and
an independent FPGA development board together with Arduino. By carrying the ESP32 chip, SEA also has 2.4GHz
WiFi and Bluetooth 4.1 functions. Moreover, the development board integrates a rich set of peripherals and
interfaces, which is extremely playable. For example, an 8-bit ADC, a 6-axis accelerometer, two RGB LEDs, a MINI
HDMI interface, a CSI camera interface, two Grove interfaces and so on. In conclusion, it will become an ideal FPGA
entry-level development board for manufacturers and enthusiasts.
SEA is based on Xilinx Spartan-7 XC7S15 FPGA, which is a cost-effective but powerful FPGA chip.When talking
about Arduino FPGA, we always mention the first driver Arduino MKR Vidor 4000. Compared with the official Arduino
MKR Vidor 4000, the Spartan Edge Accelerator Board has similar performance, but the price is less than its half !
The Spartan Edge Accelerator Board can run at a clock speed of up to 100Mhz, and provides 12.8K logic units and
360Kb block RAM. Well, driving a camera or HDMI display is just a piece of cake. In addition to our breakthrough
XC7S15's 10 user programmable I/O pins, you can also configure them as PWM, I2C, I2S, UART, SPI, etc.
•
ESP32
We know you like ESP32, so we use it as a wireless core. It supports 802.11 b / g / n 2.4GHz WiFi and Bluetooth
4.1 with BLE. Isn't it amazing that you can make your Arduino have FPGA and wireless functions with just one board?
•
Arduino FPGA API
Most importantly, even if you don't know anything about FPGA theory, we still provide a complete Arduino FPGA
API, which can help you use FPGA resources to control FPGA I/O through Arduino IDE. SEA will provide Arduino
with previously unimaginable functions, such as edge technology, image recognition, signal sampling and
processing.

Spartan Edge Accelerate Board Development Manual---ESP32
Part
6 / 47
Hardware Overview
In order to more clearly grasp the characteristics of the SEA development board, we provide a detailed module
description diagram.
Fig.1-2 Module Details
⚫
High-speed image processing
➢
Support Raspberry Pi 1st Generation camera (OV5640)
➢
Support a maximum transmission rate of 30 frames
⚫
Encrypted IoT
➢
Support Cloud Service (AWS Cloud, Azure Cloud and etc)
➢
Support software encryption and decryption
⚫
Multi-channel expansion I/O

Spartan Edge Accelerate Board Development Manual---ESP32
Part
7 / 47
➢
20-channel expansion I/O interface (FPGA independent mode)
➢
10-channel expansion I/O interface (Arduino interface mode)
➢
Support Arduino expansion interface
⚫
Target users
➢
IoT developer
➢
Arduino developer
➢
FPGA developer
About This Document
The SEA Development Manual consists of three parts in total. This part is the first part-ESP32. This part will focus
on the four main directions of on-board ESP32 resources, driver firmware, environment configuration and
development program.

Spartan Edge Accelerate Board Development Manual---ESP32
Part
8 / 47
Specification of safety use
⚫Please turn off the main switch of the circuit board before using the expansion interface to expand the
circuit application to avoid damage to the device.
⚫It is recommended that the circuit board should be used on an insulated platform, otherwise it may cause
damage to the circuit board.
⚫Prevent static electricity when using the circuit.
⚫Be careful when defining the positive and negative poles of the power supply and I/O port to avoid
damage to the development board due to reverse connection.
⚫Keep the surface of the circuit board clean.
⚫Handle with care to avoid unnecessary hardware damage.

Spartan Edge Accelerate Board Development Manual---ESP32
Part
9 / 47
Table of Contents
1. Development Description of ESP32 ................................................................................................................ 10
1.1 Introduction of on-board ESP32 configuration ....................................................................................... 10
1.2 Detailed description of the on-board ESP32 pins .................................................................................. 11
2. Front Installation Description of ESP32 .......................................................................................................... 14
2.1 Driver installation ................................................................................................................................... 14
2.2 Firmware programming ......................................................................................................................... 16
3. Description of ESP32 Development Platform ................................................................................................. 19
3.1 Configuration of Micro-Python development environment ..................................................................... 19
3.1.1
Software use of uPyCraft ............................................................................................................... 20
3.1.2
Software use of thonny .................................................................................................................. 21
3.2
Configuration of Arduino IDE development environment ...................................................................... 24
4.Introduction of ESP32 Development Program ................................................................................................. 34
4.1
Micro-Python development .................................................................................................................... 34
4.1.1 Introduction of Micro-Python library...............................................................................................34
4.1.2 Usage examples of GPIO in Micro-Python development..............................................................35
4.1.3 Usage Examples of UART in Micro-Python development.............................................................37
4.1.4 Usage examples of IIC in Micro-Python development...................................................................39
4.1.5 Usage examples of SPI in Micro-Python development..................................................................40
4.1.6 Usage examples of Network in Micro-Python development..........................................................42
4.2 Arduino IDE development ...................................................................................................................... 45
4.2.1 Usage examples of WIFI in Arduino IDE development..................................................................46

Spartan Edge Accelerate Board Development Manual---ESP32
Part
10 /
47
1. Development Description of ESP32
1.1 Introduction of on-board ESP32 configuration
SEA on-board ESP32 use ESP32-D0WDQ6 solution in ESP32 Series of ESPRESSIF, ESP32 chip is shown in the
figure below (should be ESP32-D0WDQ6- 2J2018-TUBOPHPU07)
Fig. 1-1 ESP32-D0WDQ6
The specific configuration is as follows:
⚫ Equipped with WIFI solution (2.4GHz), and use 802.11 b/g/n standard
⚫Equipped with Bluetooth solution (v4.2 standard), compatible with traditional Bluetooth (BR/EDR) and low
power consumption Bluetooth (BLE)
⚫CPU uses a 32-bit Lx6 single/dual core processor, with a computing power of up to 600MIPS, and internal
ROM (448KB), SRAM (520KB), RTC SRAM (16KB)
⚫Equipped with off-chip SPI interface FLASH (W25Q32JVZPIG), 32-bit, 4M storage, 1024 sectors, 64 blocks,
each block is 64K bytes, and supports clock speeds up to 80MHz
The pin layout is as follows:
Fig.1-2 ESP32 pin layout (package is QFN6*6, top view)

Spartan Edge Accelerate Board Development Manual---ESP32
Part
10 / 47
1.2 Detailed description of the on-board ESP32 pins
ESP32 PIN
NAME
PAD
No.
GPIO No.
PIN NAME OF
ACTUAL
CONNECTION
TYPE
FUNCTION
NOTE
VDDA
1
/
VCC_ESP
P
Power supply 3.3v
With 2A fuse
LNA_IN
2
/
/
I/O
RF I/O
/
VDD3P3
3/4
/
VCC_ESP
P
Power supply 3.3v
With 2A fuse
SENSOR_VP
5
36
ESP_AR_A0
I
GPIO INPUT/ADC1_CH0
The input is externally connected with a pull-down 20K
resistor
SENSOR_CA
PP
6
37
ESP_AR_A1
I
GPIO INPUT/ADC1_CH1
The input is externally connected with a pull-down 20K
resistor
SENSOR_CA
PN
7
38
ESP_AR_A2
I
GPIO INPUT/ADC1_CH2
The input is externally connected with a pull-down 20K
resistor
SENSOR_VN
8
39
ESP_AR_A3
I
GPIO INPUT/ADC1_CH3
The input is externally connected with a pull-down 20K
resistor
CHIP_PU
9
/
CHIP_PU
I
HIGH LEVEL: CHIP ENABLE
LOW LEVEL: CHIP OFF
Related to RST button, default high level
VDET_1
10
34
FPGA_DONE_ESP
I
GPIO INPUT/ADC1_CH6
Directly connected to P9 pin of FPGA, external pull-up
VDET_2
11
35
ESP_FPGA-TYPE
I
GPIO INPUT/ADC1_CH7
Default voltage VCC_ESP/2
32K_XP
12
32
ESP_SDA_A4
I/O
GPIO/ADC1_CH4
Connected to analog switch COM1 input
(the analog switch is controlled by the H3 pin of FPGA, and
the default external pull-down)
Under high level: connect to ESP_A4, pull down 20K by
default
Under low level: connected to AR_SDA, the default pull-up
is 4.7K (if used, the N4 pin of the FPGA must be high at this
time, otherwise the pin will output high)
33K_XN
13
33
ESP_SCL_A5
I/O
GPIO/ADC1_CH5
Connect to analog switch COM2 input
(the analog switch is controlled by the H3 pin of FPGA, and
the default external pull-down)
Under high level: connect to ESP_A5, pull down 20K by
default
Under low level: connected to AR_SCL, the default pull-up
is 4.7K (if used, the N4 pin of the FPGA must be high at this
time, otherwise the pin will output high)
GPIO25
14
25
FPGA_PROGRAM_E
SP
I/O
GPIO
Directly connected to the L7 pin of FPGA, the externally pull-
up 4.7K by default
GPIO26
15
26
FPGA_INTB_ESP
I/O
GPIO
Directly connected to the L8 pin of FPGA, the externally pull-
up 4.7K by default

Spartan Edge Accelerate Board Development Manual---ESP32 Part
12 / 47
GPIO27
16
27
FPGA_CONFIG_DIN_E
SP
I/O
GPIO
Directly connected to the B12 pin of FPGA
MTMS
17
14
SDCARD_CCLK
I/O
SD_CLK
Directly connected to clock pin of TF Card
MTDI
18
12
SDCARD_D2
I/O
SD_DATA2
Directly connected to data pin DAT2 of TF Card
VDD3P3_RT
C
19
/
VCC_ESP
P
Power supply 3.3v
With 2A fuse
MTCK
20
13
SDCARD_D3
I/O
SD_DATA3
Directly connected to data pin DAT3/CD of TF Card
MTDO
21
15
SDCARD_CMD
I/O
SD_CMD
Directly connected to command pin of TF Card
GPIO2
22
2
SDCARD_D0
I/O
SD_DATA0
Directly connected to data pin DAT0 of TF Card
GPIO0
23
0
GPIO0
I/O
BOOT
Pull up 10K by default, when the BOOT button is pressed,
it will become low level
GPIO4
24
4
SDCARD_D1
I/O
SD_DATA1
Directly connected to data pin DAT1 of TF Card
GPIO16
25
16
SDCARD_CD
I/O
GPIO
Directly connected to CD pin of TF Card
VDD_SDIO
26
/
FLASH_VDD
P
Test point, supply power to
FLASH
Default no welding (DNP)
GPIO17
27
17
FPGA_CCLK_ESP
I/O
GPIO
Directly connected to the A8 pin of FPGA
SD_DATA_2
28
9
FLASH_SHD
I/O
SPIHD
Directly connected to the HOLD pin of FLASH
SD_DATA_3
29
10
FLASH_SWP
I/O
SPIWP
Directly connected to the WP pin of FLASH
SD_CMD
30
11
FLASH_SCS
I/O
SPICS0
Directly connected to the CS pin of FLASH
SD_CLK
31
6
FLASH_SCK
I/O
SPICLK
Directly connected to the CLK pin of FLASH
SD_DATA_0
32
7
FLASH_SDO
I/O
SPIQ
Directly connected to the DO pin of FLASH
SD_DATA_1
33
8
FLASH_SDI
I/O
SPID
Directly connected to the DI pin of FLASH
GPIO5
34
5
ESP_QSPI_CS
I/O
GPIO/VSPICS0
Directly connected to the M13 pin of FPGA, and QSPI com
munication can be performed
GPIO18
35
18
ESP_QSPI_CLK
I/O
GPIO/VSPICLK
Directly connected to the H14 pin of FPGA, and QSPI com
munication can be performed
GPIO23
36
23
ESP_QSPI_D
I/O
GPIO/VSPID
Directly connected to the P2 pin of FPGA, and QSPI
communication can be performed
VDD3P3_CP
U
37
/
VCC_ESP
P
Power supply 3.3v
With 2A fuse
GPIO19
38
19
ESP_QSPI_Q
I/O
GPIO/VSPIQ
Directly connected to the L14 pin of FPGA, and QSPI
communication can be performed
GPIO22
39
22
ESP_QSPI_WP
I/O
GPIO/VSPIWP
Directly connected to the J13 pin of FPGA, and QSPI
communication can be performed

Spartan Edge Accelerate Board Development Manual---ESP32 Part
13 / 47
U0RXD
40
3
U0RXD
I/O
U0RXD
Reserved serial port, directly connected to Type-C, cannot be
used alone
U0TXD
41
1
U0TXD
I/O
U0TXD
Reserved serial port, directly connected to Type-C, cannot be
used alone
GPIO21
42
21
ESP_QSPI_HD
I/O
GPIO/VSPIHD
Directly connected to the D13 pin of FPGA, and QSPI
communication can be performed
VDDA
43
/
VCC_ESP
P
Power supply 3.3v
With 2A fuse
XTAL_N
44
/
XTAL_N
O
External master oscillator
output
24MHz
XTAL_P
45
/
XTAL_P
I
External master oscillator
input
24MHz
VDDA
46
/
VCC_ESP
P
Power supply 3.3v
With 2A fuse
CAP2
47
/
/
I
/
Shunt the 3NF capacitor and 20K Ω resistor to cap1
CAP1
48
/
/
I
/
Series 10nf capacitor to ground
GND
49
/
/
P
/
Ground

Spartan Edge Accelerate Board Development Manual---ESP32 Part
14 / 47
2. Front Installation Description of ESP32
2.1 Driver installation
The on-board ESP32 needs to be connected to the PC through a Type-C cable, and the driver is CP210x USB (for
different computer needs, you can visit
S
ilicon Lab
s
Official Website for download), the specific installation steps are
as follows:
(1) Connect one end of the Type-C cable to the computer and the other end to the SEA board, and power on
Fig. 2-1 Connection diagram
(2) Open the PC device manager and check the port information. If there is no CP210x in the port, then there will be
a triangle exclamation mark in the universal serial bus controller to indicate that there is no driver.
(3) Visit the official website to download the corresponding USB driver (or use it directly in the attachment package)

Spartan Edge Accelerate Board Development Manual---ESP32 Part
15 / 47
Fig.2-2 Driver download
(4) After decompressing the compressed package, select and install according to the PC system (x64 or x86) (when
installing, the board needs to be powered off)
Fig 2-3 Driver installation
(5) After the installation is complete, power on the board again, and the following information can be seen in the
device manager, which means the installation is complete
Fig. 2-4 Successful installation
(6) If the installation fails, check whether the driver is selected correctly (ESP32 and Type-C have been tested
before the board leaves the factory)

Spartan Edge Accelerate Board Development Manual---ESP32 Part
16 / 47
2.2 Firmware programming
For SEA on-board ESP32, the firmware has been burnt before leaving the factory by default. However, for different
usage scenarios, users can customize the firmware for programming. The programming tools can be downloaded
from ESPRESSIF official website (or directly use Flash Download Tools in the attachment package), where the
download on the official website is as follows:
Fig. 2-5 Download of firmware programming tools
The programming steps are as follows:
(1)Run the exe file named flash_download_tool_3.8.5 in the folder (Note: The downloaded version may not be exactly
the same)
Fig. 2-6 Firmware programming-1
(2) Select Developer Mode
Fig. 2-7 Firmware programming-2
(3) Select ESP32 Download Tool

Spartan Edge Accelerate Board Development Manual---ESP32 Part
17 / 47
Fig. 2-8 Firmware programming-3
(4) Wait for 3-4 seconds,and then enter the following interface
Fig.2-9 Firmware programming-4
(5) Select the firmware (bin file) that needs to be programmed. The default is the bin file provided by SEA official
(different from the initial ESP32 firmware), and select the correct port (check in the device manager, it may not be
consistent with the port in the screenshot), other default configuration, baud rate up to 921600.
Fig.2-9 Firmware programming-5
(6) Press and hold the BOOT button on the board

Spartan Edge Accelerate Board Development Manual---ESP32 Part
18 / 47
Fig.2-10 Firmware programming-6
(7) Click START, when the progress bar starts to read, you can release the BOOT button (Note: If there is an ERROR
situation after releasing it, it means that you must press and hold BOOT during firmware programming)
Fig 2-11 Firmware programming-7
(8) After the programming is completed, the effect is as follows
Fig. 2-12 Firmware programming-8

Spartan Edge Accelerate Board Development Manual---ESP32 Part
19 / 47
3. Description of ESP32 Development Platform
ESP32 programming development is divided into Micro-Python platform and Arduino IDE platform according to the
different needs of users. The reference opinions are as follows:
•
Developers are accustomed to using python language or have been experienced in micro-python
language, and the Micro-Python platform is recommended.
•
Development projects need to simplify the code structure and require low difficulty in entry-level, and
the Micro-Python platform is recommended
•
Developers are accustomed to using C language or proficient in Arduino IDE, Arduino IDE platform is
recommended
•
For development projects that require better interaction and require high algorithm complexity, the
Arduino IDE platform is recommended
(Note: For more technical reference materials of ESP32, you can find on ESPRESSIF Official Website)
3.1 Configuration of Micro-Python development environment
There are many options for Micro-Python development tools. At present, the offline execution tool uPyCraft that does
not need to be installed is more suitable (provided in the attachment package), and the standard development tools
such as ESPRESSIF IDF and thonny tools on GitHub are available.
Considering the installation and use experience, this document introduces the uPyCraft and the thonny tools.
Before the introduction, you need to prepare a TF card, connect it to the PC through a card reader, convert it to FAT32
format through formatting operations (do not format quickly), and then create an Overlay folder in the root directory of
the TF card and store it inside bit file and create a board_config.json file in the root directory. The content of the file is
as follows:
"Board_Info": {
"board_name": "SEA",
"version:": [
0, 1, 0
],
"relese_date":[
2019,6,2
"Board_Setup": {
"WIFI_config": {
"enable": "false",
"ssid": "None",
"password": "None"

Spartan Edge Accelerate Board Development Manual---ESP32 Part
20 / 47
3.1.1
Software use of uPyCraft
For uPyCraft software, briefly introduce the following interface components. In addition to the conventional selections
in the top toolbar, on the right side of the interface, from top to bottom, create a new file, open a file, save this file,
download and run, stop , connect to the serial port, backward, forward, grammar check, clear the console output.
Fig.3-1 Introduction diagram of uPyCraft interface
The specific use process is as follows:
(1) Open the py file that needs to be downloaded to ESP32 (it can be opened via Open on the right or File->Open on
the top toolbar)
"FTP_config":{
"enable":"false"
"boot_on_SDcard":"false"
"Overlay_List": [
"system_wrapper.bit",
"Camera_Demo.bit"
Other manuals for Digi-Key Electronics Spartan Edge Accelerate...
1
Table of contents
Other seeed studio Motherboard manuals

seeed studio
seeed studio BeagleBone Green User manual

seeed studio
seeed studio Seeeduino Lotus v1.0 User manual

seeed studio
seeed studio Base Shield V2 User manual

seeed studio
seeed studio BeagleBone Green Administrator Guide

seeed studio
seeed studio Digi-Key Electronics Spartan Edge Accelerate... User manual

seeed studio
seeed studio Wio Tracker User manual