我在调试68332的TPU模块时,程序不能进入中断程序段,调试环境SDS7.0,麻烦哪位大哥抽空帮我看一看,谢谢! /*程序功能是当TP9产生中断后将88写入D3寄存器,在singlestep下编译调试*/ TPUMCR EQU $fffe00 TICR EQU $fffe08 CIER EQU $fffe0a CFSR0 EQU $fffe0c CFSR1 EQU $fffe0e CFSR2 EQU $fffe10 CFSR3 EQU $fffe12 HSQR0 EQU $fffe14 HSQR1 EQU $fffe16 HSRR0 EQU $fffe18 HSRR1 EQU $fffe1a CPR0 EQU $fffe1c CPR1 EQU $fffe1e CISR EQU $fffe20 * Channel 0 parameters PRAM0_0 EQU $ffff00 PRAM0_1 EQU $ffff02 PRAM0_2 EQU $ffff04 PRAM0_3 EQU $ffff06 PRAM0_4 EQU $ffff08 PRAM0_5 EQU $ffff0a * Channel 2 parameters PRAM2_0 EQU $ffff20 PRAM2_1 EQU $ffff22 PRAM2_2 EQU $ffff24 PRAM2_3 EQU $ffff26 PRAM2_4 EQU $ffff28 PRAM2_5 EQU $ffff2a * Channel 5 parameters PRAM5_0 EQU $ffff50 PRAM5_1 EQU $ffff52 PRAM5_2 EQU $ffff54 PRAM5_3 EQU $ffff56 PRAM5_4 EQU $ffff58 PRAM5_5 EQU $ffff5a * Channel 7 parameters PRAM7_0 EQU $ffff70 PRAM7_1 EQU $ffff72 PRAM7_2 EQU $ffff74 PRAM7_3 EQU $ffff76 PRAM7_4 EQU $ffff78 PRAM7_5 EQU $ffff7a * Channel 9 parameters PRAM9_0 EQU $ffff90 PRAM9_1 EQU $ffff92 PRAM9_2 EQU $ffff94 PRAM9_3 EQU $ffff96 PRAM9_4 EQU $ffff98 PRAM9_5 EQU $ffff9a * Channel 1 parameters PRAM1_0 EQU $ffff10 PRAM1_1 EQU $ffff12 PRAM1_2 EQU $ffff14 PRAM1_3 EQU $ffff16 PRAM1_4 EQU $ffff18 PRAM1_5 EQU $ffff1a * Channel 3 Parameters PRAM3_0 EQU $ffff30 PRAM3_1 EQU $ffff32 PRAM3_2 EQU $ffff34 PRAM3_3 EQU $ffff36 PRAM3_4 EQU $ffff38 PRAM3_5 EQU $ ffff3a * Channel 4 parameters PRAM4_0 EQU $ffff40 PRAM4_1 EQU $ffff42 PRAM4_2 EQU $ffff44 PRAM4_3 EQU $ffff46 PRAM4_4 EQU $ffff48 PRAM4_5 EQU $ffff4a * Channel 6 parameters PRAM6_0 EQU $ffff60 PRAM6_1 EQU $ffff62 PRAM6_2 EQU $ffff64 PRAM6_3 EQU $ffff66 PRAM6_4 EQU $ffff68 PRAM6_5 EQU $ffff6a * Channel 11 parameters PRAM11_0 EQU $ffffb0 PRAM11_1 EQU $ffffb2 PRAM11_2 EQU $ffffb4 PRAM11_3 EQU $ffffb6 PRAM11_4 EQU $ffffb8 PRAM11_5 EQU $ffffba * Channel 13 parameters PRAM13_0 EQU $ffffd0 PRAM13_1 EQU $ffffd2 PRAM13_2 EQU $ffffd4 PRAM13_3 EQU $ffffd6 PRAM13_4 EQU $ffffd8 PRAM13_5 EQU $ffffda * Channel 15 parameters PRAM15_0 EQU $ffffF0 PRAM15_1 EQU $ffffF2 PRAM15_2 EQU $ffffF4 PRAM15_3 EQU $ffffF6 PRAM15_4 EQU $ffffF8 PRAM15_5 EQU $ffffFa XDEF START XREF STKTOP section code START: MOVE.W #$a0a0,(CFSR0).l MOVE.W #$a0a0,(CFSR1).l MOVE.W #$a9a9,(CFSR2).l MOVE.W #$0909,(CFSR3).l MOVE.W #$4444,(HSQR0).l MOVE.W #$4400,(HSQR1).l TP9/Z1 MOVE.W #$0007,(PRAM9_0).l MOVE.W #$000e,(PRAM9_1).l MOVE.W #$0001,(PRAM9_2).l ANDI.W #$555F,(CIER).l MOVE.W (CISR).l,d0 ANDI.W #$555F,(CISR).l ORI.W #$0005,(TPUMCR).l MOVE.W #$0680,(TICR).l ANDI.W #$f5ff,SR MOVE.W #$ff3f,(CPR0).l MOVE.W #$f3ff,(CPR1).l MOVE.W #$4444,(HSRR0).l MOVE.W #$6622,(HSRR1).l ORI.W #$8200,(CIER).l FINISH: BRA FINISH INT: ANDI.W #$555F,(CIER).l MOVE.W (CISR).l,d0 ANDI.W #$555F,(CISR).l MOVE.W #$88,D3 RTE section reset DC.L STKTOP DC.L START section vects DS.L 135 DC.L INT END link文件: partition{ overlay{ region {} reset[addr=0x0]; /* reset vector */ region {} vects[addr=0x8]; /* other vectors */ region {} code[addr=0x400]; /* executable code */ region {} init; /* pointers to C++ init thunks */ region {} exit; /* pointers to C++ exit thunks */ region {} const; /* constant data */ region {} string; /* constant string */ DATA = $; /* where to download region data */ } o1; }ROM[addr=0x100000]; partition{ overlay{ region {} data[roundsize = 4]; /* RAM to be initalized on reset */ region {} ram[roundsize = 4]; /* RAM to be zeroed on reset */ region {} malloc[size = 0x1000]; /* RAM available to malloc() */ region {} stack[size = 0x1000]; /* stack of at least 0x1000 bytes */ STKTOP = $; /* stack pointer reset value */ } o2; }RAM[addr=0x160000]; |