⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ha_int_emi.s

📁 nandflash的烧录
💻 S
字号:
;***************************************************
;//file name :HA_int_uart.s
;//description:
;//modify history
;
;*******************************************************


	AREA INT_EMI, CODE, READONLY                                                     
	       ENTRY                           ; Mark first instruction to execute 
	       
	include hardware_gfd.h

	       
	       
ENT_INT_EMI
	EXPORT ENT_INT_EMI
	 
	;*****************************************ENT_INT_EMI
	ldmfd	sp!, R_ALL_0_12

	msr		cpsr_c,	#0xd3  ;CHANGE MODLE TO THE SVC MODLE
	;NOW IN THE SVC MODLE 
	stmfd	sp!, {RTA}    ;save the temp value  
	
	IMPORT	LR_IRQ
	IMPORT	SPSR_IRQ
	ldr		RTA, =LR_IRQ
	ldr		RTA, [RTA]   ;;LOAD THE LR
	

	sub		RTA,RTA,#4
	stmfd	sp!, {RTA}	;SAVE THE LR_IRQ-4 TO THE SP_SYS
	
	ldr		RTA, =SPSR_IRQ
	ldr		RTA, [RTA]   ;;LOAD THE SPSR_IRQ

	stmfd	sp!, {RTA}	;SAVE THE SPSR_IRQ TO THE SP_SYS   ;stmfd sp!, {spsr, lr}
		;____________________________________________________one layer

	
	stmfd	sp!, R_ALL_0_12
	
	ldr		RTA, =INTC_PLV  ;//read the plv  and store in the stack
	ldr		RTA, [RTA]  
	
	stmfd	sp!, {RTA}        ;//SAVE THE PLV INTO THE SVC'S STACK

	;set the plv
	ldr		RTA, =INTC_PLV
	mov		RTB, #13
	str		RTB,  [RTA]
	
;	IMPORT	ent_int
;	bl		ent_int
	
	;open the irq
	;mrs		RTA, cpsr
	;bic		RTA, RTA, #0x80  ;OPEN IRQ
	;msr		cpsr_c, RTA
	
	;jump to the int_handler
	IMPORT	int_serv_emi
	bl  		int_serv_emi
	
	IF :DEF: HA_DEBUG
	
	ENDIF
	
	;CLOSE THE IRQ
	mrs		RTA, cpsr
	orr		RTA, RTA, #0X80   ;CLOSE IRQ
	msr		cpsr_c, RTA
	
	IMPORT	END_INT
	b		END_INT
		;=========================================END OF ENT_INT_RTC
	END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -