当前位置:网站首页>Esp32-ulp coprocessor low power mode RTC GPIO interrupt wake up
Esp32-ulp coprocessor low power mode RTC GPIO interrupt wake up
2022-07-07 08:50:00 【Morning breeze】
Chen Tuo 2022/07/06-2022/07/06
1. summary
This example shows when ULP adopt WAKE Command to RTC When the controller sends an interrupt signal , How should the main program configure the interrupt handling function to respond to the interrupt signal .
- RTC GPIO
RTC GPIO Altogether 18 individual IO mouth , these GPIO Pins have low power consumption RTC Performance and simulation functions , And by the ESP32 Of RTC Subsystem control . These functions are not used IO_MUX and GPIO Commutative matrix , But use RTC_MUX take IO Point to RTC Subsystem .
When these pins are configured as RTC GPIO When pin , As an output pin, the chip can be in Deep-Sleep Keep the output level value in sleep , Or when used as an input pin, the chip can be removed from Deep-Sleep Wake up in the .
The following table lists them RTC Pin and its corresponding GPIO Pin
ULP Interrupt sending official routine in ESP-IoT-Solution In the library :
- ESP-IoT-Solution brief introduction
RTC GPIO
Official documents :
https://docs.espressif.com/projects/espressif-esp-iot-solution/zh_CN/latest/gettingstarted.html
- ESP-IoT-Solution edition
Different versions ESP-IoT-Solution The explanation is as follows :
- ESP-IoT-Solution Programming Guide
https://docs.espressif.com/projects/espressif-esp-iot-solution/zh_CN/latest/index.html
2. obtain ESP-IoT-Solution
- Get orders
If from the official of Lexin github Library Download is difficult , You can start with gitee Clone a library on , And then from gitee Upload and download . Here is the download from my cloned Library , My library is private , You need to clone one yourself .
- download esp-iot-solution v1.1
cd ~/esp
git clone -b release/v1.1 --recursive https://gitee.com/chentuo2000/esp-iot-solution.git
from gitee When downloading clone library , The subject is going well , Having trouble downloading submodules , You need to manually download the following sub modules :
Download manually according to the source and the corresponding installation path .
If you still can't download , You can download this from the link below 3 Sub module :
download Adafruit-GFX-Library.tar.gz
https://download.csdn.net/download/chentuo2000/85481416
download ugfx.tar.gz
https://download.csdn.net/download/chentuo2000/85481491
download lvgl.tar.gz
https://download.csdn.net/download/chentuo2000/85481538
3. development environment
《 Use Lexin domestic Gitee Image building ESP32 development environment 》
https://zhuanlan.zhihu.com/p/348106034
https://blog.csdn.net/chentuo2000/article/details/113424934?spm=1001.2014.3001.5501
4. Build the project
- Official routine
ULP Example of interrupt sending program :
https://github.com/espressif/esp-iot-solution/tree/release/v1.1/examples/ulp_examples/ulp_send_interrupt
according to ULP Of WAKE Instructions :
-- If the Lord CPU In sleep mode , And ULP Wakeup is enabled , Then the interrupt signal will wake up the master CPU;
-- If the Lord CPU In non sleep mode , And RTC Interrupt enable register (RTC_CNTL_INT_ENA_REG) Corresponding ULP Interrupt enable bit (RTC_CNTL_ULP_CP_INT_ENA) To be placed , Then the interrupt signal will trigger RTC The controller generates an interrupt ;
The following is a ULP Interrupt registration and interrupt handling functions :
- Copy official routine
Copy the official example project to ESP-IDF Beyond development tools :
cd ~/esp
cp -r ~/esp/esp-iot-solution/examples/ulp_examples/ulp_send_interrupt ~/esp/
- Project tree
cd ulp_send_interrupt
- Refresh esp-idf Environmental Science
get_idf
Be careful : Each time you open the terminal, enter sdk Execute this command once
- Set the target chip
idf.py set-target esp32
- Clear previous builds
- Configuration items
idf.py menuconfig
1) Set up Flash The memory size is 4MB
2) ULP It is enabled by default
3) choice Support array 'rtc_gpio_desc' fot ESP32
Otherwise, there will be error: 'rtc_gpio_desc' undeclared
preservation , sign out .
- Compile the project
idf.py build
- Burn project
see USB Serial port COM slogan :
burning :
idf.py -p /dev/ttyS3 -b 115200 flash
- Enable monitor
idf.py monitor -p /dev/ttyS3
5. Sample test
After example startup ,ULP Will always be in a cycle ( Time is 20ms) Running state , testing GPIO0 Is it pressed . When the key is pressed and released :
-- If the Lord CPU In sleep mode , Then this operation will wake up the master CPU;
-- If the Lord CPU In non sleep mode , Then this operation will send a RTC interrupt , After the interrupt program completes the corresponding processing , Will the Lord CPU Set to enter sleep mode ;
The log of the system is printed as follows :

边栏推荐
- How to realize sliding operation component in fast application
- Greenplum6.x搭建_安装
- Laravel8 uses passport login and JWT (generate token)
- selenium自动化集成,八年测试经验软测工程师,一篇文章带你学懂
- Calling the creation engine interface of Huawei game multimedia service returns error code 1002, error message: the params is error
- How to integrate app linking services in harmonyos applications
- Greenplum 6.x common statements
- 为什么要选择云原生数据库
- Data type - integer (C language)
- redis故障处理 “Can‘t save in background: fork: Cannot allocate memory“
猜你喜欢

Mountaineering team (DFS)

Category of IP address

Interpolation lookup (two methods)
![[Yugong series] February 2022 U3D full stack class 006 unity toolbar](/img/2e/3a7d71a0b5a6aff294a0bd2f8515f8.jpg)
[Yugong series] February 2022 U3D full stack class 006 unity toolbar

調用華為遊戲多媒體服務的創建引擎接口返回錯誤碼1002,錯誤信息:the params is error
![[南京大学]-[软件分析]课程学习笔记(一)-introduction](/img/57/bf652b36389d2bf95388d2eb4772a1.png)
[南京大学]-[软件分析]课程学习笔记(一)-introduction
![[MySQL] detailed explanation of trigger content of database advanced](/img/6c/8aad649e4ba1160db3aea857ecf4a1.png)
[MySQL] detailed explanation of trigger content of database advanced

Greenplum 6.x common statements

NCS Chengdu Xindian interview experience

Through the "last mile" of legal services for the masses, fangzheng Puhua labor and personnel law self-service consulting service platform has been frequently "praised"
随机推荐
Quick sorting (detailed illustration of single way, double way, three way)
求有符号数的原码、反码和补码【C语言】
Mock.js用法详解
redis故障处理 “Can‘t save in background: fork: Cannot allocate memory“
LeetCode 736. Lisp 语法解析
测试踩坑 - 当已有接口(或数据库表中)新增字段时,都需要注意哪些测试点?
Exercise arrangement 2.10, 11
xray的简单使用
let const
23 Chengdu instrument customization undertaking_ Discussion on automatic wiring method of PCB in Protel DXP
Oracle makes it clear at one time that a field with multiple separators will be split into multiple rows, and then multiple rows and columns. Multiple separators will be split into multiple rows, and
How to realize the high temperature alarm of the machine room in the moving ring monitoring system
如何在图片的目标中添加目标的mask
说一个软件创业项目,有谁愿意投资的吗?
使用AGC重签名服务前后渠道号信息异常分析
[Yu Yue education] basic reference materials of electrical and electronic technology of Nanjing Institute of information technology
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
Gson converts the entity class to JSON times declare multiple JSON fields named
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
[MySQL] detailed explanation of trigger content of database advanced
https://github.com/espressif/esp-iot-solution