当前位置:网站首页>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 .
边栏推荐
- Open version - order delivery
- How to import Taobao products into another store
- About structure (notes, for personal use)
- [usecols parameter of pd.read\u excel ((), list error reason]
- 精益生产|精益管理
- Flutter uses the for loop
- Flutter gets the context, and flutter gets the DOM element location
- Kuangshi brain++ Tianyuan platform megstudio
- JS implementation of random generation of 16 bit key -- Basic accumulation
- Kinect azure based multi camera data collection (I)
猜你喜欢

汇编学习《汇编语言(第三版)》王爽著第四章学习

RT-Thread临界段的保护

Canoe learning notes (6) diagram of logging block data recording module

Rviz ROS wiki official website tutorial learning notes (1) - User Guide

Chromedriver所有版本下载

Crmeb open source version, a free mall worth trying

Image interpolation (nearest neighbor, bilinear)

Bad slam resolution

咖啡供应链是如何被趟平的?

Self attention (notes, for personal use)
随机推荐
Antd - a-upload-dragger drag upload component - Basic accumulation
Detailed explanation of capturing the whole store treasure and uploading it to multiple stores
Canoe learning notes (6) diagram of logging block data recording module
微信小游戏(五)
Canoe learning notes (1) illustration of new project and channel configuration steps
咖啡供应链是如何被趟平的?
[v4.3] the applet fails to receive the subscription message, and the coupon time on the product details page is displayed incorrectly
Flutter uses the for loop
How to solve 'webdriver' object has no attribute 'switch_ to_ window‘
报错 E: Unable to locate package sudo
A training summary of Intranet penetration test
Backup the method of uploading babies in Taobao stores to multiple stores
About pointer (notes, for personal use)
How to import Taobao products into another store
Get through - coupons
chrome浏览器查看cookie方法
2 lines of text on the right of the left Avatar
ASP. Net core development experience
Real MySQL interview question (18) -- practical operation analysis
Use of the thrust Library in CUDA