ESP32 Application Guide

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/k331922164/article/details/100540013

I. Introduction.

In the past, the company can be Shun introduced a low-cost WIFI module after (based Lexin's ESP8266 chip), the fire for some time. This module is supported by AT commands and SDK two modes of development.

AT command is very simple, with a few instructions to send serial port, you can make the module into the serial pass-through mode, users basically do not involve complex TCP / IP protocol.

SDK development, the equivalent of firmware library development, the official provides a wealth of examples, with operating system and there is no operating system, etc., code readability is good, difficult to get started is not high.

Due to the positioning ESP8266 itself is a low-cost networking solutions, so its performance is not too high, not suitable for very complicated thing.

Later, Shun and yet launched a WIFI / Bluetooth module ESP32, it can be said to be an enhanced version of ESP8266. In addition to increasing the Bluetooth 4.2, but also increases the very rich set of peripherals, such as: ADC, SPI, IIC, IIS, SDIO, UART, PWM, infrared controller, wired Ethernet MAC, AES, SHA, RSA, the random number generator, PID controller, capacitive touch sensor, a low-noise amplifier, a temperature sensor, the DAC and the like. At the same time, CPU frequency up to 240MHz, but the price is not high.

STM32 also launched a similar chip, is STM32WB series, which is an increase of STM32 Bluetooth 5, OpenThread, ZigBee 3.0. But when buying this chip on Taobao, the seller said it was an outlet pipe products, companies need to sign a contract.

Obviously, ESP32 than STM32WB advantage.

The following are ESP32S module, for example the development of the Windows environment, describes the notes of development. From time to time update.

Second, the hardware design.

2.1 serial.

ESP8266 ESP-01 series of default communication module a serial output debugging information as well as AT commands.

ESP32 series ESP32S a total of three serial module, wherein a serial output 0 debug information and firmware programming, the serial communication done AT commands .

Serial 0 is U0RXD, U0TXD pin serial port 2 is U2RXD, U2TXD pins.

That is when using AT commands, ESP32 no longer ESP8266 as a power-up on a bunch of print debug information, the user experience is improved.

2.2 antenna.

ESP32 module layout on the PCB, board edges beyond the requirements of the antenna, as shown, or may affect the radio communication distance.

Three, SDK development environment.

3.1 ESP32-IDF configuration.

SDK is used herein ESP32-IDF, the specific network environment configuration can refer to the official " Example 4: ESP32_IDF use ."

It should be noted, IDF does not need to use git to download directly there at AiThinkerIDE_V0.5 installation directory, but the old IDF, I have here is C: \ AiThinkerIDE_V0.5 \ cygwin \ home \ aithinker \ project \ esp -idf.

The git download the new IDF, under AiThinkerIDE_V0.5, you can not use the new IDF . (Official representation in AiThinkerIDE support the development of new versions)

So here is the old copy IDF out under the helloword example copy out, App renamed, according to the other examples 4 to do it.

3.2 Eclipse burned firmware.

In the Make Menuconfig that step, enter the Serial flasher config.

Enter Default serial port.

Here's my serial number is COM10, corresponding to the following cgywin serial number ttyS9. If COM1, the corresponding ttyS0, the corresponding number minus 1.

Here configured as / dev / ttyS9.

Also, provide a baud rate of 921600.

I tried here 1,152,000, programming failed, the baud rate depending on the specific hardware serial signal quality may be poor signal quality, the need to reduce the baud rate.

Then quit, save it. In this way, you can use the shift Download in F9 +, that is, make flash command.

Appears as shown below, is the successful programming.

This method than the ESP Flash Download Tool is much more convenient.

3.3 Other problems.

Problems shown below, may not care, as long as it shows the code Build success no problem. (IDE lexical analyzer may be not doing actually find these variables)

Fourth, the reference material.

ESP32S official information .

Official source (including ESP32 and ESP8266, etc.) .

ESP32 FAQ .

ESP32 Hardware Design Guide .

ESP32 Technical Reference .

ESP32 AT command set with the use of examples .

ESP32 pin list .

ESP32S product specifications .

ESP32 series chip manual .

ESP32 factory firmware and SDK .

 

 

 

 

 

Guess you like

Origin blog.csdn.net/k331922164/article/details/100540013