当前位置:网站首页>enable_ irq_ Wake interrupt wakes up the kernel in low power mode
enable_ irq_ Wake interrupt wakes up the kernel in low power mode
2022-06-22 07:27:00 【Neilo_ chen】
Low power mode
Implement all of your drivers supend and resume function . Register an interrupt wakeup source , It's usually GPIO,RTC interrupt . And then call echo mem > state Suspend the system in memory , Now SDRAM It's going on self-refresh The action of . The basic power consumption is here
at present 2.6.kernel It's ready for you . You just need to follow the interface function in each driver suspend(...), and resume() Drive this suspend and resume complete . Because of the call apm After the command ,kernel Will call the... In your registered driver in turn suspend function , Put all kinds of peripherals into power saving mode . Last CPU Get into power down Pattern same , When used RTC perhaps GPIO One of them will cpu from power down Mode wake up . In turn, it will call the... In each driver resume Function wakes up the peripheral , Enter the normal working state . Of course, you have to define the interrupt wakeup source yourself enable_irq_wake(irq);
in addition , stay 2.6 in , To drive suspend Add the code for the corresponding equipment to enter the power saving state , stay resume Add the code for the corresponding device to return to the normal working mode from low power consumption .
When the keyboard driver is initialized, add enable_irq_wake, When the key is interrupted , You can wake up the sleepy kernel
Interrupt operations are often used when writing drivers , Some interrupt configuration functions have been written in the kernel driver for easy use , And gpio It is better to use the operation configuration function together .
void disable_irq(unsigned int); // Turn off the corresponding interrupt number
void enable_irq(unsigned int);// Turn on the corresponding interrupt number
int set_irq_type(unsigned int irq, unsigned int type);// Set the trigger mode of interrupt
void disable_irq_wake(unsigned int irq); // Disable interrupt wake-up function
void enable_irq_wake(unsigned int irq);// Enable interrupt wake-up function
The following steps should be completed during driver initialization of external interrupts :
1. Set the corresponding pin to interrupt function
2. Set interrupt type (IRQ perhaps FIQ)
3. Set the trigger mode
4. Enable this interrupt
Function interface for setting trigger mode
int set_irq_type(unsigned int irq, unsigned int type);
interrupt pending register , It is mainly used to identify which interrupt is generated .
边栏推荐
- Greek alphabet - system / service name commonly used in development - Collection
- TypeScript & 详细解释 in、keyof、extends、索引签名、Record、typeof 的含义(不定时更新)
- Backup the method of uploading babies in Taobao stores to multiple stores
- Matlab uses deep learning recurrent neural network RNN long-term and short-term memory LSTM to predict waveform time series data
- Crmeb mall order shipping function
- Detr3d model source code Guide & mmdetection3d construction process
- How to batch copy babies by sales volume in Taoying
- Summary of methods for calculating the number of solutions of indefinite equations
- RFID仓储管理系统解决方案实施可视化流程
- 5g NR PWS system
猜你喜欢

Backup the method of uploading babies in Taobao stores to multiple stores

True MySQL interview question (19) -- Tiktok -- select the list of users who have logged in for two consecutive days every month
The solution of word document being locked and unable to edit

Thousands of sails pass by the side of the sunken boat, and thousands of trees spring before the diseased tree
![[standard version 4.3] marketing activities (group bargaining second kill) error reporting under orders](/img/44/2e7789a97fa43d196ef770e8b3c4d4.jpg)
[standard version 4.3] marketing activities (group bargaining second kill) error reporting under orders

The mountains and rivers are heavy, and there is no doubt that there is no way out. There is another village where the willows are dark and the flowers are bright.

Flutter gets the context, and flutter gets the DOM element location

微信小游戏(四)

antd 框架:点击链接重开浏览器页面——基础积累

Does it matter if you delete the pictures in the picture space after uploading to the store
随机推荐
Use of the thrust Library in CUDA
网站如何提高百度权重
Kinect azure based multi camera data collection (I)
Solution to the problem of "brand abuse such as brand inconsistency and stacking in the published product information" prompted by copying and uploading
Bad slam resolution
Kuangshi brain++ Tianyuan platform megstudio
网站的排名对于网站很重要
微信小游戏(四)
简单是最好的网络推广的方法
架构图颜色搭配
robotframework使用 及问题解决
Find and replace the spaces, Nan and special symbols contained in a column of data in the dataframe
Chromedriver all versions download
How to import and upload a CSV generated by a third-party platform to a Taobao store
Choco usage notes -- how to set the default package installation location of choco
Crmeb open source version, a free mall worth trying
How to cancel crmeb customer service link
The solution of word document being locked and unable to edit
[usecols parameter of pd.read\u excel ((), list error reason]
Canoe uses tricks to export data from logging file/trace to Matlab for analysis