历史上的今天
今天是:2024年10月28日(星期一)
2019年10月28日 | arm开关中断汇编接口
2019-10-28 来源:51hei
; EQUATES
;********************************************************************************************************
CPU_ARM_CTRL_INT_DIS EQU 0xC0 ; Disable both FIQ & IRQ
;********************************************************************************************************
; CODE GENERATION DIRECTIVES
;********************************************************************************************************
AREA _CPU_A_CODE_, CODE, READONLY
ARM
;$PAGE
;********************************************************************************************************
; CRITICAL SECTION FUNCTIONS
;
; Description : Disable/Enable interrupts by preserving the state of interrupts. Generally speaking, the
; state of the interrupt disable flag is stored in the local variable 'cpu_sr' & interrupts
; are then disabled ('cpu_sr' is allocated in all functions that need to disable interrupts).
; The previous interrupt state is restored by copying 'cpu_sr' into the CPU's status register.
;
; Prototypes : CPU_SR CPU_SR_Save (void);
; void CPU_SR_Restore(CPU_SR cpu_sr);
;********************************************************************************************************
CPU_SR_Save
MRS R0, CPSR
CPU_SR_Save_Loop
; Set IRQ & FIQ bits in CPSR to DISABLE all interrupts
ORR R1, R0, #CPU_ARM_CTRL_INT_DIS
MSR CPSR_c, R1
MRS R1, CPSR ; Confirm that CPSR contains the proper interrupt disable flags
AND R1, R1, #CPU_ARM_CTRL_INT_DIS
CMP R1, #CPU_ARM_CTRL_INT_DIS
BNE CPU_SR_Save_Loop ; NOT properly DISABLED (try again)
BX LR ; DISABLED, return the original CPSR contents in R0
CPU_SR_Restore ; See Note #2
MSR CPSR_c, R0
BX LR
;$PAGE
;********************************************************************************************************
; CPU ASSEMBLY PORT FILE END
;********************************************************************************************************
END
史海拾趣
|
摘要 本文介绍了一种UC3843控制的小功率多路DC/DC模块电源的详细设计过程,重点讨论了多路输出模块电源设计与单路输出的不同,详细介绍了DC/DC模块电源中常用的新型芯片UC3843的外围电路参数的设计,给出了多路输出模块电源中变压器和耦合电感 ...… 查看全部问答> |
|
利用MCF52259片上i2c 控制器读写常用的at24c02 eeprom,用的开发板是我们做的NSCF52259-R1开发板 //filename: i2c_driver.h //mcf52259 i2c驱动头文件 #ifndef _NICROSYSTEM_NSCF52259R1_I2C_DRIVER_H_ #define _NICROSYSTEM_NSCF52259R1 ...… 查看全部问答> |
|
Freescale 2009 seminar之五New Product Update Update i.MX for Consumer and Ge New Product Update: i.MXARM9 for Consumer and General Embedded Market ►i.MXApplications Processor Overview •Target markets, product portfolio •ARM®9 portfolio comparison •Platform support ► ...… 查看全部问答> |
|
最近开始迷茫。。。 其实硬件方面我还是新手,可对未来的发展已经很是迷茫。。。 刚毕业一年,有幸进了一家芯片方案公司,自家的芯片,完全成熟的方案,一直以来都是熟悉熟悉,早晚熟悉完了 ...… 查看全部问答> |
|
Test engineers and magicians have a lot in common; they are both expected to pull rabbits out of a hat on command. But it doesn\'t stop there. Test engineers are expected to pull test systems out of a hat while juggling multiple p ...… 查看全部问答> |
|
2440的开发板! 请问usb共5线,怎么接踩可以使其正常工作! USB带有供电功能! ------------ 现在是在板子上点USB CONNECT 显示已连接,而且在PC端,ActiveSync的图片也在闪, 但过一会就显示无法连接! … 查看全部问答> |
|
…… #include #include \"gpio.h\" #define PRIVATE static #define PUBLIC /* GPIO 寄存器对应的虚拟地址 */ PRIVATE volatile S3C6410_IOPORT_ ...… 查看全部问答> |




