这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » [求助]S3C44B0X在矢量中断确实存在问题,请问大侠是如何解决的呢?

共4条 1/1 1 跳转至

[求助]S3C44B0X在矢量中断确实存在问题,请问大侠是如何解决的呢?

菜鸟
2005-04-05 18:24:18     打赏

理论上说,在中断向量地址(IRQ)0x18软件上应该不需要什么处理吧!

事实上在我的实验中,一来中断就直接进入未定义指令异常了!

以下为引用:

AREA Init,CODE,READONLY

ENTRY b ResetHandler ;for debug b HandlerUndef ;handlerUndef b HandlerSWI ;SWI interrupt handler b HandlerPabort ;handlerPAbort b HandlerDabort ;handlerDAbort b . ;handlerReserved b HandlerIRQ b HandlerFIQ ;***IMPORTANT NOTE*** ;If the H/W vectored interrutp mode is enabled, The above two instructions should ;be changed like below, to work-around with H/W bug of S3C44B0X interrupt controller. ; b HandlerIRQ -> subs pc,lr,#4 ; b HandlerIRQ -> subs pc,lr,#4 可是就是改了这两句,也没有什么效果啊!




关键词: 求助     S3C44B0X     矢量     中断     确实     存在         

菜鸟
2005-04-16 01:47:00     打赏
2楼

我在去年在成都赛能科技买了一块微芯力的开发板,当初没有提供矢量中断程序范例! 一直以来我关于这方面的实验都是失败!

我一直以来都是使用非矢量中断处理。矢量中断啊!我的梦想!(各位大侠帮忙啊!) 这是什么原因呢?还望赐教啊! 会不会是: a,BIOS的原因呢? b,单个小程序直接烧写到ROM甚至无法正常运行,难道是烧写器的问题?c,其他原因?


菜鸟
2005-04-19 01:51:00     打赏
3楼

大哥你好歹非矢量中断没问题了,有时间的话教教小弟好吗?或者能否分享一个好的能够实现中断的project.

qq:396216222 popbaiban4080 baiban408@163.com

求助,44b0中断问题

我调44B0的中断已经好几天了,但到现在还没有成功,板子是自己做的,可以保证SDRAM 和 FLASH 是没有问题的, 在调试中断过程中遇到了一些费疑所思的现象,列出来希望大家指点。 我我自己写了一个很简单的中断测试小程序,由于没做外部按键,使用time0产生中断,使用单次触发,在中断中手动更新计数值, pc4-7口外接led灯, 使用ADS1.2编译,如下: GET option.h GET memcfg.h GET regdef.h

AREA Init,CODE,READONLY ENTRY B Reset_Handler B . B . B . B . NOP b HandlerIRQ ; ldr pc, =0x0000020 B . ;************************************************* ;Timer0 Interrupt Service Routine ;************************************************* ;b HandlerIRQ

Reset_Handler ;**************************************************** ;* System Configuration special Register * ;**************************************************** ;after reset write buffer operational and cache is disable ;LDR R0, =SYSCFG ; System Configuration (0X01c00000) ;LDR R1, =0x0f ; WB enable,Cache 8KB,stall enable ;STR R1, [R0]

;**************************************************** ;* Watchdog timer Special Registers * ;**************************************************** LDR R0, =WTCON ; Watchdog timer Special ( 0x01d30000) LDR R1, =0x0 ; watch dog disable STR R1, [R0] ;**************************************************** ;* Set Clock Controller Special Registers * ;**************************************************** [ PLLONSTART ; ldr r0,=PLLCON ; ldr r1,=((M_DIV<<12)+(P_DIV<<4)+S_DIV) str r1,[r0] ] LDR R0, =LOCKTIME ; PLL LOCK TIME COUNT REGISTER (0x01d8000c) LDR R1, =0xfff ; STR R1, [R0]

;**************************************************** ;* Set memory control SPECIAL registers * ;**************************************************** ldr r0,=SMRDATA ldmia r0,{r1-r13} ldr r0,=0x01c80000 ;BWSCON Address stmia r0,{r1-r13} ;**************************************************** ;初始化堆栈 * ;**************************************************** ldr sp, =SVCStack bl InitStacks ;**************************************************** ; Interrupt Special Registers * ;**************************************************** LDR R1,=INTMSK LDR R0,=0x3ffdfff STR R0,[R1] LDR R1,=INTCON ;Interrupt control LDR R0,=0x5 ;enable the IRQ interrupt STR R0,[R1] ; ;LDR R1, =I_PSLV ; LDR R0, =0xe4e435e4 ; ; STR R0, [R1] ; LDR R1, =I_PMST ;就是这三条语句一旦去掉分号,make的话就会出现我说的那种情况了, ;坏比唬庵皇俏遗龅秸庵智榭鲋械囊恢侄选? ; LDR R0, =0x12e4 ; STR R0, [R1] ;********************************* ;LED Display ;********************************* LDR R1,=PCONC LDR R0,=0xaaaa55aa STR r0, [r1] LDR R1,=PDATC LDR R0,=0x5f STR R0,[R1] EOR R0,R0,R0 ;R0 清零 ;************************************** ; Timer0 Special Registers ;************************************** LDR R1,=TCFG0 LDR R0,=0x9f STR R0,[R1] LDR R1,=TCFG1 LDR R0,=0x0001 STR R0,[R1] LDR R1,=TCON LDR R0,=0x0002 STR R0,[R1] LDR R1,=TCNTB0 LDR R0,=0xffff STR R0,[R1] LDR R1,=TCON LDR R0,=0x0001 STR R0,[R1] B . HandlerIRQ

STMFD SP!,{R0-R6,LR} ;保护现场 LDR R1,=INTMSK LDR R0,=0x3ffdfff STR R0,[R1] LDR R1,=INTCON ;Interrupt control LDR R0,=0x5 ;enable the IRQ interrupt STR R0,[R1] LDR R1,=TCON LDR R0,=0x0002 STR R0,[R1] LDR R1,=TCNTB0 LDR R0,=0xffff STR R0,[R1] LDR R1,=TCON LDR R0,=0x0001 STR R0,[R1] LDR R1,=PDATC ;读port c 的值进行移位并送回 ldr r0, [r1] ;=0x5f eor r0, r0, #0xf0 STR R0, [R1] ldr r4, =I_ISPR ldr r4, =0xffffffff ;[r4] ldr r5, =I_ISPC str r4, [r5] LDMFD SP!,{R0-R6,LR} ;恢复现场,中断返回 SUBS PC,LR,#4 ;**************************************************** ;* The function for initializing stack * ;**************************************************** InitStacks ;Do not use DRAM,such as stmfd,ldmfd...... ;SVCstack is initialized before ;Under toolkit ver 2.50, 'msr cpsr,r1' can be used instead of 'msr cpsr_cxsf,r1'

mrs r0,cpsr bic r0,r0,#MODEMASK orr r1,r0,#IRQMODE|NOINT msr cpsr_cxsf,r1 ;IRQMode ldr sp,=IRQStack bic r0,r0,#MODEMASK|NOINT orr r1,r0,#SVCMODE ;|NOINT msr cpsr_cxsf,r1 ;SVCMode ;USER mode is not initialized. mov pc,lr SMRDATA DATA ;***************************************************************** ;* Memory configuration has to be optimized for best performance * ;* The following parameter is not optimized. * ;*****************************************************************

;*** memory access cycle parameter strategy *** ; 1) Even FP-DRAM, EDO setting has more late fetch point by half-clock ; 2) The memory settings,here, are made the safe parameters even at 66Mhz. ; 3) FP-DRAM Parameters:tRCD=3 for tRAC, tcas=2 for pad delay, tcp=2 for bus load. ; 4) DRAM refresh rate is for 40Mhz.

; ****************(BWSCON:0X01c80000) bus width & wait control register ************** [ BUSWIDTH=16 ;Defined in option.a DCD 0x11111110 ;Bank0=OM[1:0], Bank1~Bank7=16bit bus | ;BUSWIDTH=32 DCD 0x22222220 ;Bank0=OM[1:0], Bank1~Bank7=32bit bus ] ; *********(BANKCON0~BANKCON5: 0X01c80004~0X01c80018) bank control register ********** DCD ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tcah<<4)+(B0_Tpac<<2)+(B0_PMC)) ;GCS0 DCD ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tcah<<4)+(B1_Tpac<<2)+(B1_PMC)) ;GCS1 DCD ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tcah<<4)+(B2_Tpac<<2)+(B2_PMC)) ;GCS2 DCD ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tcah<<4)+(B3_Tpac<<2)+(B3_PMC)) ;GCS3 DCD ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tcah<<4)+(B4_Tpac<<2)+(B4_PMC)) ;GCS4 DCD ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tcah<<4)+(B5_Tpac<<2)+(B5_PMC)) ;GCS5 ; *********(BANKCON6~BANKCON7: 0X01c8001c~0X01c80020) bank control register ********** [ BDRAMTYPE="DRAM" ;Defined in option.a DCD ((B6_MT<<15)+(B6_Trcd<<4)+(B6_Tcas<<3)+(B6_Tcp<<2)+(B6_CAN)) ;GCS6 check the MT value in parameter.a DCD ((B7_MT<<15)+(B7_Trcd<<4)+(B7_Tcas<<3)+(B7_Tcp<<2)+(B7_CAN)) ;GCS7 | ;"SDRAM(Sync.DRAM )" DCD ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ;GCS6 DCD ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ;GCS7 ]

;*****************(REFRESH:0x01c80024) Refresh Control Register*********************** DCD ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ;REFRESH RFEN=1, TREFMD=0, trp=3clk, trc=5clk, tchr=3clk,count=1019

;*****************(BANKSIZE:0x01c80028) Banksize Register**************************** ;******MRSR(MRSRB6:0x01c8002C) SDRAM mode register set Register********************** ;******MRSR(MRSRB7:0x01c80030) SDRAM mode register set Register********************** DCD 0x10 ;SCLK power down mode, BANKSIZE 32M/32M !!!!!00 DCD 0x20 ;MRSR6 CL=2clk CAS latency time 0x30 cl=3clk DCD 0x20 ;MRSR7 ALIGN

;************************************************************************* ;*************************************************************************

AREA RamData, DATA, READWRITE

^ _ISR_STARTADDRESS UserStack # 256 SVCStack # 256 UndefStack # 256 AbortStack # 256 IRQStack # 256 FIQStack # 256

END

我条中断时把程序先烧到FLASH中,使用FLAHSPROGRAM 烧写,当第一次烧进去时程序可以正常运行, 中断也可以正常产生;而当复位或重新上电之后中断却怎莫也不能正常成生和运行了,这怪现象真是让我倍思不得其解, 我才可能时中断产生后中断的处理的程序的地址没有正常的写入PC。于是我又把程序入口的 B Reset_Handler B . B . B . B . NOP b HandlerIRQ ; ldr pc, =0x0000020 B . ;************************************************* ;Timer0 Interrupt Service Routine ;************************************************* ;b HandlerIRQ 改成

B Reset_Handler B . B . B . B . NOP ldr pc, =0xc000020 B . b HandlerIRQ 然后先将程序烧写道flash里,再改codewarriar中的响应选项编译make后产生.axf文件用方针器调试,但在方针器里调试一点问题也没有, 在b HandlerIRQ处设置断点,中断产生和处理都很正常,我实在是想不通到底是怎末会事,我在 网上看了很多网友的经验, 也没有找到自己的问题出在那里,请诸位仁兄帮忙看看,如果那位仁兄有好的中断处理的程序,能否与小弟分享。 qq:396216222 popbaiban4080 baiban408@163.com


菜鸟
2005-04-19 08:17:00     打赏
4楼

; ******************************************************* ; * NAME : 44BINIT.S * ; * Version : 10.JAn.2003 * ; * Description: * ; * C start up codes * ; * Configure memory, Initialize ISR ,stacks * ; * Initialize C-variables * ; * Fill zeros into zero-initialized C-variables * ; ******************************************************* GET ..\inc\option.a

GET ..\inc\memcfg.a

;Interrupt Control INTPND EQU 0x01e00004 INTMOD EQU 0x01e00008 INTMSK EQU 0x01e0000c I_ISPR EQU 0x01e00020 I_CMST EQU 0x01e0001c

;Watchdog timer WTCON EQU 0x01d30000

;Clock Controller PLLCON EQU 0x01d80000 CLKCON EQU 0x01d80004 LOCKTIME EQU 0x01d8000c ;Memory Controller REFRESH EQU 0x01c80024

;Pre-defined constants USERMODE EQU 0x10 FIQMODE EQU 0x11 IRQMODE EQU 0x12 SVCMODE EQU 0x13 ABORTMODE EQU 0x17 UNDEFMODE EQU 0x1b MODEMASK EQU 0x1f NOINT EQU 0xc0

;check if tasm.exe is used. GBLL THUMBCODE [ {CONFIG} = 16 THUMBCODE SETL {TRUE} CODE32 | THUMBCODE SETL {FALSE} ]

[ THUMBCODE CODE32 ;for start-up code for Thumb mode ]

MACRO $HandlerLabel HANDLER $HandleLabel

$HandlerLabel sub sp,sp,#4 ;decrement sp(to store jump address) stmfd sp!,{r0} ;PUSH the work register to stack(lr does't push because it return to original address) ldr r0,=$HandleLabel;load the address of HandleXXX to r0 ldr r0,[r0] ;load the contents(service routine start address) of HandleXXX str r0,[sp,#4] ;store the contents(ISR) of HandleXXX to stack ldmfd sp!,{r0,pc} ;POP the work register and pc(jump to ISR) MEND

IMPORT |Image$$RO$$Limit| ; End of ROM code (=start of ROM data) IMPORT |Image$$RW$$Base| ; Base of RAM to initialise IMPORT |Image$$ZI$$Base| ; Base and limit of area IMPORT |Image$$ZI$$Limit| ; to zero initialise

IMPORT Main ; The main entry of mon program

AREA Init,CODE,READONLY

ENTRY b ResetHandler ;for debug b HandlerUndef ;handlerUndef b HandlerSWI ;SWI interrupt handler b HandlerPabort ;handlerPAbort b HandlerDabort ;handlerDAbort b . ;handlerReserved b HandlerIRQ b HandlerFIQ ;***IMPORTANT NOTE*** ;If the H/W vectored interrutp mode is enabled, The above two instructions should ;be changed like below, to work-around with H/W bug of S3C44B0X interrupt controller. ; b HandlerIRQ -> subs pc,lr,#4 ; b HandlerIRQ -> subs pc,lr,#4

VECTOR_BRANCH ldr pc,=HandlerEINT0 ;mGA H/W interrupt vector table ldr pc,=HandlerEINT1 ; ldr pc,=HandlerEINT2 ; ldr pc,=HandlerEINT3 ; ldr pc,=HandlerEINT4567 ; ldr pc,=HandlerTICK ;mGA b . b . ldr pc,=HandlerZDMA0 ;mGB ldr pc,=HandlerZDMA1 ; ldr pc,=HandlerBDMA0 ; ldr pc,=HandlerBDMA1 ; ldr pc,=HandlerWDT ; ldr pc,=HandlerUERR01 ;mGB b . b . ldr pc,=HandlerTIMER0 ;mGC ldr pc,=HandlerTIMER1 ; ldr pc,=HandlerTIMER2 ; ldr pc,=HandlerTIMER3 ; ldr pc,=HandlerTIMER4 ; ldr pc,=HandlerTIMER5 ;mGC b . b . ldr pc,=HandlerURXD0 ;mGD ldr pc,=HandlerURXD1 ; ldr pc,=HandlerIIC ; ldr pc,=HandlerSIO ; ldr pc,=HandlerUTXD0 ; ldr pc,=HandlerUTXD1 ;mGD b . b . ldr pc,=HandlerRTC ;mGKA b . ; b . ; b . ; b . ; b . ;mGKA b . b . ldr pc,=HandlerADC ;mGKB b . ; b . ; b . ; b . ; b . ;mGKB b . b . ;0xe0=EnterPWDN ldr pc,=EnterPWDN

LTORG

HandlerFIQ HANDLER HandleFIQ HandlerIRQ HANDLER HandleIRQ HandlerUndef HANDLER HandleUndef HandlerSWI HANDLER HandleSWI HandlerDabort HANDLER HandleDabort HandlerPabort HANDLER HandlePabort

HandlerADC HANDLER HandleADC HandlerRTC HANDLER HandleRTC HandlerUTXD1 HANDLER HandleUTXD1 HandlerUTXD0 HANDLER HandleUTXD0 HandlerSIO HANDLER HandleSIO HandlerIIC HANDLER HandleIIC HandlerURXD1 HANDLER HandleURXD1 HandlerURXD0 HANDLER HandleURXD0 HandlerTIMER5 HANDLER HandleTIMER5 HandlerTIMER4 HANDLER HandleTIMER4 HandlerTIMER3 HANDLER HandleTIMER3 HandlerTIMER2 HANDLER HandleTIMER2 HandlerTIMER1 HANDLER HandleTIMER1 HandlerTIMER0 HANDLER HandleTIMER0 HandlerUERR01 HANDLER HandleUERR01 HandlerWDT HANDLER HandleWDT HandlerBDMA1 HANDLER HandleBDMA1 HandlerBDMA0 HANDLER HandleBDMA0 HandlerZDMA1 HANDLER HandleZDMA1 HandlerZDMA0 HANDLER HandleZDMA0 HandlerTICK HANDLER HandleTICK HandlerEINT4567 HANDLER HandleEINT4567 HandlerEINT3 HANDLER HandleEINT3 HandlerEINT2 HANDLER HandleEINT2 HandlerEINT1 HANDLER HandleEINT1 HandlerEINT0 HANDLER HandleEINT0

;One of the following two routines can be used for non-vectored interrupt.

IsrIRQ ;using I_ISPR register. sub sp,sp,#4 ;reserved for PC stmfd sp!,{r8-r9}

;IMPORTANT CAUTION ;if I_ISPC isn't used properly, I_ISPR can be 0 in this routine.

ldr r9,=I_ISPR ldr r9,[r9] mov r8,#0x0 0 movs r9,r9,lsr #1 bcs %F1 add r8,r8,#4 b %B0

1 ldr r9,=HandleADC add r9,r9,r8 ldr r9,[r9] str r9,[sp,#8] ldmfd sp!,{r8-r9,pc}

;**************************************************** ;* START * ;**************************************************** ResetHandler ldr r0,=WTCON ;watch dog disable ldr r1,=0x0 str r1,[r0]

ldr r0,=INTMSK ldr r1,=0x07ffffff ;all interrupt disable str r1,[r0]

;**************************************************** ;* Set clock control registers * ;**************************************************** ldr r0,=LOCKTIME ; ldr r1,=800 ; count = t_lock * Fin (t_lock=200us, Fin=4MHz) = 800 ldr r1,=2100 ; count = t_lock * Fin (t_lock=210us, Fin=10MHz) = 2100

str r1,[r0]

[ PLLONSTART ldr r0,=PLLCON ;temporary setting of PLL ldr r1,=((M_DIV<<12)+(P_DIV<<4)+S_DIV) ;Fin=10MHz,Fout=60MHz str r1,[r0] ]

ldr r0,=CLKCON ldr r1,=0x7ff8 ;All unit block CLK enable str r1,[r0]

;**************************************************** ;* Set memory control registers * ;**************************************************** ldr r0,=SMRDATA ldmia r0,{r1-r13} ldr r0,=0x01c80000 ;BWSCON Address stmia r0,{r1-r13}

;**************************************************** ;* Initialize stacks * ;**************************************************** ldr sp, =SVCStack ;Why? bl InitStacks

;**************************************************** ;* Setup IRQ handler * ;**************************************************** ldr r0,=HandleIRQ ;This routine is needed ldr r1,=IsrIRQ ;if there isn't 'subs pc,lr,#4' at 0x18, 0x1c str r1,[r0]

;******************************************************** ;* Copy and paste RW data/zero initialized data * ;******************************************************** LDR r0, =|Image$$RO$$Limit| ; Get pointer to ROM data LDR r1, =|Image$$RW$$Base| ; and RAM copy LDR r3, =|Image$$ZI$$Base| ;Zero init base => top of initialised data CMP r0, r1 ; Check that they are different BEQ %F1 0 CMP r1, r3 ; Copy init data LDRCC r2, [r0], #4 ;--> LDRCC r2, [r0] + ADD r0, r0, #4 STRCC r2, [r1], #4 ;--> STRCC r2, [r1] + ADD r1, r1, #4 BCC %B0 1 LDR r1, =|Image$$ZI$$Limit| ; Top of zero init segment MOV r2, #0 2 CMP r3, r1 ; Zero init STRCC r2, [r3], #4 BCC %B2

[ :LNOT:THUMBCODE BL Main ;Don't use main() because ...... B . ]

[ THUMBCODE ;for start-up code for Thumb mode orr lr,pc,#1 bx lr CODE16 bl Main ;Don't use main() because ...... b . CODE32 ]

;**************************************************** ;* The function for initializing stack * ;**************************************************** InitStacks ;Don't use DRAM,such as stmfd,ldmfd...... ;SVCstack is initialized before ;Under toolkit ver 2.50, 'msr cpsr,r1' can be used instead of 'msr cpsr_cxsf,r1'

mrs r0,cpsr bic r0,r0,#MODEMASK orr r1,r0,#UNDEFMODE|NOINT msr cpsr_cxsf,r1 ;UndefMode ldr sp,=UndefStack orr r1,r0,#ABORTMODE|NOINT msr cpsr_cxsf,r1 ;AbortMode ldr sp,=AbortStack

orr r1,r0,#IRQMODE|NOINT msr cpsr_cxsf,r1 ;IRQMode ldr sp,=IRQStack orr r1,r0,#FIQMODE|NOINT msr cpsr_cxsf,r1 ;FIQMode ldr sp,=FIQStack

bic r0,r0,#MODEMASK|NOINT orr r1,r0,#SVCMODE msr cpsr_cxsf,r1 ;SVCMode ldr sp,=SVCStack

;USER mode is not initialized. mov pc,lr ;The LR register may be not valid for the mode changes.

;**************************************************** ;* The function for entering power down mode * ;**************************************************** ;void EnterPWDN(int CLKCON); EnterPWDN mov r2,r0 ;r0=CLKCON ldr r0,=REFRESH ldr r3,[r0] mov r1, r3 orr r1, r1, #0x400000 ;self-refresh enable str r1, [r0]

nop ;Wait until self-refresh is issued. May not be needed. nop ;If the other bus master holds the bus, ... nop ; mov r0, r0 nop nop nop nop

;enter POWERDN mode ldr r0,=CLKCON str r2,[r0]

;wait until enter SL_IDLE,STOP mode and until wake-up mov r0,#0xff 0 subs r0,r0,#1 bne %B0

;exit from DRAM/SDRAM self refresh mode. ldr r0,=REFRESH str r3,[r0] mov pc,lr

LTORG

SMRDATA DATA ;***************************************************************** ;* Memory configuration has to be optimized for best performance * ;* The following parameter is not optimized. * ;*****************************************************************

;*** memory access cycle parameter strategy *** ; 1) Even FP-DRAM, EDO setting has more late fetch point by half-clock ; 2) The memory settings,here, are made the safe parameters even at 66Mhz. ; 3) FP-DRAM Parameters:tRCD=3 for tRAC, tcas=2 for pad delay, tcp=2 for bus load. ; 4) DRAM refresh rate is for 40Mhz.

DCD 0x11110090 ;Bank0=OM[1:0], Bank1~Bank7=16bit, bank2=8bit; DCD ((B0_Tacs<<13)+(B0_Tcos<<11)+(B0_Tacc<<8)+(B0_Tcoh<<6)+(B0_Tah<<4)+(B0_Tacp<<2)+(B0_PMC)) ;GCS0 DCD ((B1_Tacs<<13)+(B1_Tcos<<11)+(B1_Tacc<<8)+(B1_Tcoh<<6)+(B1_Tah<<4)+(B1_Tacp<<2)+(B1_PMC)) ;GCS1 DCD ((B2_Tacs<<13)+(B2_Tcos<<11)+(B2_Tacc<<8)+(B2_Tcoh<<6)+(B2_Tah<<4)+(B2_Tacp<<2)+(B2_PMC)) ;GCS2 DCD ((B3_Tacs<<13)+(B3_Tcos<<11)+(B3_Tacc<<8)+(B3_Tcoh<<6)+(B3_Tah<<4)+(B3_Tacp<<2)+(B3_PMC)) ;GCS3 DCD ((B4_Tacs<<13)+(B4_Tcos<<11)+(B4_Tacc<<8)+(B4_Tcoh<<6)+(B4_Tah<<4)+(B4_Tacp<<2)+(B4_PMC)) ;GCS4 DCD ((B5_Tacs<<13)+(B5_Tcos<<11)+(B5_Tacc<<8)+(B5_Tcoh<<6)+(B5_Tah<<4)+(B5_Tacp<<2)+(B5_PMC)) ;GCS5 DCD ((B6_MT<<15)+(B6_Trcd<<2)+(B6_SCAN)) ;GCS6 DCD ((B7_MT<<15)+(B7_Trcd<<2)+(B7_SCAN)) ;GCS7 DCD ((REFEN<<23)+(TREFMD<<22)+(Trp<<20)+(Trc<<18)+(Tchr<<16)+REFCNT) ;REFRESH RFEN=1, TREFMD=0, trp=3clk, trc=5clk, tchr=3clk,count=1019 DCD 0x16 ;SCLK power mode, BANKSIZE 32M/32M DCD 0x20 ;MRSR6 CL=2clk DCD 0x20 ;MRSR7

ALIGN

AREA RamData, DATA, READWRITE

^ (_ISR_STARTADDRESS-0x500) UserStack # 256 ;c1(c7)ffa00 SVCStack # 256 ;c1(c7)ffb00 UndefStack # 256 ;c1(c7)ffc00 AbortStack # 256 ;c1(c7)ffd00 IRQStack # 256 ;c1(c7)ffe00 FIQStack # 0 ;c1(c7)fff00

^ _ISR_STARTADDRESS HandleReset # 4 HandleUndef # 4 HandleSWI # 4 HandlePabort # 4 HandleDabort # 4 HandleReserved # 4 HandleIRQ # 4 HandleFIQ # 4

;Don't use the label 'IntVectorTable', ;because armasm.exe cann't recognize this label correctly. ;the value is different with an address you think it may be. ;IntVectorTable HandleADC # 4 HandleRTC # 4 HandleUTXD1 # 4 HandleUTXD0 # 4 HandleSIO # 4 HandleIIC # 4 HandleURXD1 # 4 HandleURXD0 # 4 HandleTIMER5 # 4 HandleTIMER4 # 4 HandleTIMER3 # 4 HandleTIMER2 # 4 HandleTIMER1 # 4 HandleTIMER0 # 4 HandleUERR01 # 4 HandleWDT # 4 HandleBDMA1 # 4 HandleBDMA0 # 4 HandleZDMA1 # 4 HandleZDMA0 # 4 HandleTICK # 4 HandleEINT4567 # 4 HandleEINT3 # 4 HandleEINT2 # 4 HandleEINT1 # 4 HandleEINT0 # 4 ;0xc1(c7)fff84

END 注:以上程序是我购买开发板时,光盘上有的,44bint.s(入口汇编程序)-----可惜我矢量模式下的一直没有弄对!像我这样的业余人员玩这个还真感觉挺难的啊!


共4条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]