当前位置:网站首页>Arm V7 kernel notes - General timers and related coprocessors
Arm V7 kernel notes - General timers and related coprocessors
2022-07-21 21:58:00 【Learning is also addictive】
- 《ARM Architecture Reference Manual ARMv7-A and ARMv7-R》
- 《Cortex-A7 MPCore Technical Reference Manual》
1. stay Cortex-A7 in ,GIC The base address of is saved in CBAR In the register ?
CBAR The register is made up of c15 visit obtain .
c15 Is the register of the system control coprocessor , adopt MRC and MCR Command access .
We can get the following command GIC Base address :MRC p15, 4, r0, c15, c0, 0 ; obtain GIC Base address , The base address is saved in r0 in .
2. About CP15 Coprocessor
About CP15 Coprocessor summary :
- 0. adopt MCR Write cp15 Register group , adopt MRC read cp15 Register group
- 1. adopt c0 Register can get processor kernel information ;
- 2. adopt c1 Registers can enable or disable MMU、 I/D Cache etc. ;
- 3. adopt c12 Register can set interrupt vector offset ;
- 4. adopt c14 Registers can access general timers ;
- 4. adopt c15 Register can get GIC Base address .
3. Set the base address of the vector table
The base address of the vector table can be through c12 Register to set :
MCR p15, 0, r0, c12, c0, 0
4.ARM 7 generic Timer - Universal timer
This general timer provides a unified system count for the kernel ,( similar SysTick?), No , This general timer is only used for counting , No interruption , Timing and interrupt are generated by the private timer on the logic core .
At least 56 A wide , from 0 Start counting , And after power on, even if it sleeps, it will not stop running .
The system counter distributes the count value to each processor core , Each processor core must contain a counter to store the current count value .
CNTFRQ register - System counter frequency register
The software can read this register to obtain the clock frequency of the system counter .
CNTFRQ The frequency of must be set during system startup , Because after reset ,CNTFRQ The value of the register is unknown
CNTPCT register - Count value register of physical timer
Each processor core provides one 64 The physical counter of bit is used to save the count value of the system counter .
CNTPCT The register is used to store the count value of the current physical counter .
CNTP_CVAL register - Comparison value register
Physical counter 64 Bit comparison value counter , When the physical counter CNTPCT Value == CNTP_CVAL When comparing values , Will produce an output signal , If enabled, interrupt , An interrupt is triggered
CNTP_TVAL register - Timer value register
Physical counter 32 Bit timer value register , When this bit is set , that :
CNTP_CVAL = CNTPCT + CNTP_TVAL
When the physical counter value , That is, after the system counter value reaches the value of the comparison value register , It will trigger the timing signal output .
CNTP_CTL register - Physical timer control register
The 32 Bit register is used to control physical timer .
The first 0 position , Indicates whether the physical timer is enabled ,1 To enable ;
The first 1 position , Indicates whether the timing signal of the physical timer is enabled ,1 To enable .
By accessing physical counters , Then you can take the physical counter as the operating system Tick interrupt , And the setting of the system time base can be obtained by matching the system counter frequency counter and the comparison value register
边栏推荐
- 基于任务型对话的医疗诊断 Task-oriented Dialogue System for Automatic Diagnosis
- 002_SSSS_ Denoising Diffusion Implicit Models
- 【句子互动转载】1. 对话系统趋势分析
- 树莓派4B新机系统配置与电脑连接操作
- nimble 蓝牙开发一:BLE 蓝牙 Host 规范概述
- 基于 MS-RTOS 的 NIMBLE 开发平台
- 树莓派 4B 三声音传感器AO模块连接与高精度时间输出
- 复旦微 DW 网卡驱动踩坑
- [sentence interactive reprint] 1 Trend analysis of dialogue system
- Coupled autoencoder for single image super-resolution
猜你喜欢
Thoughts on why Bluetooth ble specification should be abstracted from GATT on the basis of att
基于任务型对话的医疗诊断 Task-oriented Dialogue System for Automatic Diagnosis
Online Enhanced Semantic Hashing: Towards Effective and Efficient Retrieval for Streaming Multi-Moda
【半导体先进工艺制程技术系列】应变硅工艺技术
[sentence interactive reprint] 1 Trend analysis of dialogue system
Swin_ Transformer_ Minivit code interpretation
Kernel upgrade & amd NVIDIA graphics card driver & wireless network card driver and other solutions
Introduction to the study of care-gnn thesis
自己实现memcpy的功能
The library file written by yourself reports an error in vs Code: undefined reference to 'xxx'
随机推荐
OpenCV 口罩佩戴检测
[paper translation] [2004] [567] higher order later trait models for cognitive diagnosis (ho-dina high-order latent trait cognitive diagnosis model)
The distress analysis interview corpus of human and computer interviews
Swin_Transformer_minivit代码解读
Notes on generating models (II): maximum likelihood, Bayesian and maximum a posteriori probability
Asymmetric Discrete Cross-Modal Hashing
整明白了--cache组成与工作原理
Fast Supervised Discrete Hashing
IDC: Alibaba cloud ranks first in the market share of China's data governance platform in 2021
Nimble Bluetooth development I: overview of ble Bluetooth host specification
树莓派4B 文件传输
Multi robot navigation and positioning configuration record based on ROS and turtle bot2
【半导体先进工艺制程技术系列】SOI技术(上)
学习 LwIP 期间解决的网络 bug
pycharm 安装numpy失败的解决办法
基于层次化强化学习的任务型对话诊断系统 Task-oriented Dialogue System for Automatic Disease Diagnosis via HRL
Sreworks v1.2 release | O & M market capacity release
沟道长度调制效应与短沟道效应
字符串类型的数字的加减乘除运算
自己实现memcpy的功能