📄 interrupt.cod
字号:
; 1059 : RETAILMSG(1, (TEXT("INT lost %d last %d \r\n"), dwLastCount- *TIM_TIMER3VALUE ,g_dwLastInterrupt ));
00100 e5973000 ldr r3, [r7]
00104 e5962010 ldr r2, [r6, #0x10]
00108 e59f00fc ldr r0, [pc, #0xFC]
0010c e0411003 sub r1, r1, r3
00110 eb000000 bl NKDbgPrintfW
00114 e5958000 ldr r8, [r5]
00118 |$L15561|
; 1060 : }
; 1061 : dwLastCount=*TIM_TIMER3VALUE;
; 1062 :
; 1063 : CurMSec += RESCHED_PERIOD;
; 1064 : PerfCountValueSinceTick+=RESCHED_INCREMENT;
00118 e59fe0e8 ldr lr, [pc, #0xE8]
; 1065 :
; 1066 : if (fIntrTime)
0011c e59f30e0 ldr r3, [pc, #0xE0]
00120 e5971000 ldr r1, [r7]
00124 e59e2000 ldr r2, [lr]
00128 e5930000 ldr r0, [r3]
0012c e2887001 add r7, r8, #1
00130 e2823f7f add r3, r2, #0x7F, 30
00134 e58e3000 str r3, [lr]
00138 e5861000 str r1, [r6]
0013c e5857000 str r7, [r5]
00140 e3500000 cmp r0, #0
00144 0a00001e beq |$L15565|
; 1067 : {
; 1068 : dwIsrTime1 = PerfCountSinceTick();
00148 eb000000 bl PerfCountSinceTick
; 1069 : wNumInterrupts++;
0014c e59f60ac ldr r6, [pc, #0xAC]
00150 e59f10a4 ldr r1, [pc, #0xA4]
00154 e1a03000 mov r3, r0
00158 e1d620b0 ldrh r2, [r6]
; 1070 :
; 1071 : RETAILMSG(1, (TEXT("IntrTimer\r\n") ));
0015c e59f0094 ldr r0, [pc, #0x94]
00160 e5813000 str r3, [r1]
00164 e2823001 add r3, r2, #1
00168 e1c630b0 strh r3, [r6]
0016c eb000000 bl NKDbgPrintfW
; 1072 : //
; 1073 : // Not profiling, update the millisecond counter
; 1074 : //
; 1075 : dwIntrTimeCountdown--;
00170 e59f207c ldr r2, [pc, #0x7C]
00174 e5923000 ldr r3, [r2]
00178 e2533001 subs r3, r3, #1
0017c e5823000 str r3, [r2]
; 1076 :
; 1077 : if (dwIntrTimeCountdown == 0)
00180 1a000009 bne |$L15567|
; 1078 : {
; 1079 : dwIntrTimeCountdown = dwIntrTimeCountdownRef;
00184 e59f3064 ldr r3, [pc, #0x64]
; 1080 : wNumInterrupts = 0;
00188 e3a01000 mov r1, #0
0018c e1c610b0 strh r1, [r6]
00190 e5933000 ldr r3, [r3]
00194 e5823000 str r3, [r2]
; 1081 :
; 1082 : dwIsrTime2 = PerfCountSinceTick();
00198 eb000000 bl PerfCountSinceTick
0019c e59f3048 ldr r3, [pc, #0x48]
; 1083 : retval = SYSINTR_TIMING;
001a0 e3a0400a mov r4, #0xA
001a4 e5830000 str r0, [r3]
; 1084 : }
; 1085 : else
001a8 ea00000b b |$L15573|
001ac |$L15567|
; 1086 : {
; 1087 : if ((int) (CurMSec - dwReschedTime) >= 0)
001ac e59f3034 ldr r3, [pc, #0x34]
001b0 e5952000 ldr r2, [r5]
001b4 e5933000 ldr r3, [r3]
001b8 e0523003 subs r3, r2, r3
001bc 4a000006 bmi |$L15573|
; 1088 : {
; 1089 : retval = SYSINTR_RESCHED;
; 1090 : }
; 1091 : }
; 1092 : }
; 1093 : else
001c0 ea000004 b |$L15779|
001c4 |$L15565|
; 1094 : {
; 1095 : //
; 1096 : // not profiling, update the millisecond counter
; 1097 : //
; 1098 :
; 1099 : //CurMSec = dwReschedTime;
; 1100 : if ((int) (CurMSec - dwReschedTime) >= 0)
001c4 e59f301c ldr r3, [pc, #0x1C]
001c8 e5933000 ldr r3, [r3]
001cc e0573003 subs r3, r7, r3
001d0 4a000001 bmi |$L15573|
; 1101 : {
; 1102 : PerfCountValueSinceTick=0;
001d4 e58e9000 str r9, [lr]
001d8 |$L15779|
; 1103 :
; 1104 : retval = SYSINTR_RESCHED;
001d8 e3a04001 mov r4, #1
001dc |$L15573|
; 1105 : }
; 1106 : }
; 1107 : }
; 1108 :
; 1109 :
; 1110 : return retval;
001dc e1a00004 mov r0, r4
; 1111 : }
001e0 e8bd43f0 ldmia sp!, {r4 - r9, lr}
001e4 e12fff1e bx lr
001e8 |$L15785|
001e8 00000000 DCD |dwReschedTime|
001ec 00000000 DCD |dwIsrTime2|
001f0 00000000 DCD |dwIntrTimeCountdownRef|
001f4 00000000 DCD |dwIntrTimeCountdown|
001f8 00000000 DCD |??_C@_1BI@GPLMCHNC@?$AAI?$AAn?$AAt?$AAr?$AAT?$AAi?$AAm?$AAe?$AAr?$AA?$AN?$AA?6?$AA?$AA@|
001fc 00000000 DCD |dwIsrTime1|
00200 00000000 DCD |wNumInterrupts|
00204 00000000 DCD |fIntrTime|
00208 00000000 DCD |PerfCountValueSinceTick|
0020c 00000000 DCD |??_C@_1CO@PJFACELA@?$AAI?$AAN?$AAT?$AA?5?$AAl?$AAo?$AAs?$AAt?$AA?5?$AA?$CF?$AAd?$AA?5?$AAl?$AAa?$AAs?$AAt?$AA?5?$AA?$CF?$AAd?$AA?5@|
00210 b0810084 DCD 0xb0810084
00214 00000000 DCD |PProfileInterrupt|
00218 00000000 DCD |CurTicks|
0021c b0810060 DCD 0xb0810060
00220 00000000 DCD |?dwLastCount@?6??TimerInterrupt@@9@9|
00224 00000000 DCD |CurMSec|
00228 00000000 DCD |?bFirstTime@?1??TimerInterrupt@@9@9|
0022c |$M15781|
ENDP ; |TimerInterrupt|
EXPORT |SysIntrNumToInterruptMask|
00000 AREA |.text| { |SysIntrNumToInterruptMask| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$SysIntrNumToInterruptMask|, PDATA, SELECTION=5, ASSOC=|.text| { |SysIntrNumToInterruptMask| } ; comdat associative
|$T15801| DCD |$L15800|
DCD 0x40006101
; Function compile flags: /Ogsy
00000 AREA |.text| { |SysIntrNumToInterruptMask| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |SysIntrNumToInterruptMask| PROC
; 1125 : {
00000 |$L15800|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M15798|
; 1126 : BOOL bRet = TRUE;
; 1127 : switch(dwSysIntr)
00004 e240e00a sub lr, r0, #0xA
00008 e35e001b cmp lr, #0x1B
0000c e3a04001 mov r4, #1
00010 8a000054 bhi |$L15607|
00014 e1a0308e mov r3, lr, lsl #1
00018 e083300f add r3, r3, pc
0001c e1d330b4 ldrh r3, [r3, #4]
00020 e08ff003 add pc, pc, r3
00024 |$L15797|
00024 |$L15796|
00024 0144 DCW 0x144
00026 0140 DCW 0x140
00028 0140 DCW 0x140
0002a 009c DCW 0x9c
0002c 0140 DCW 0x140
0002e 0140 DCW 0x140
00030 0084 DCW 0x84
00032 00c8 DCW 0xc8
00034 0140 DCW 0x140
00036 00e8 DCW 0xe8
00038 00f8 DCW 0xf8
0003a 0108 DCW 0x108
0003c 00d8 DCW 0xd8
0003e 0034 DCW 0x34
00040 0044 DCW 0x44
00042 0054 DCW 0x54
00044 0064 DCW 0x64
00046 0074 DCW 0x74
00048 008c DCW 0x8c
0004a 00d0 DCW 0xd0
0004c 0140 DCW 0x140
0004e 00ac DCW 0xac
00050 00ac DCW 0xac
00052 0140 DCW 0x140
00054 0118 DCW 0x118
00056 0120 DCW 0x120
00058 0128 DCW 0x128
0005a 0130 DCW 0x130
0005c |$L15588|
; 1128 : {
; 1129 : case SYSINTR_TIMING:
; 1130 : //
; 1131 : // No action necessary. Needs to be handled in the calling routine.
; 1132 : //
; 1133 : *pulInterruptMask1 = 0;
; 1134 : *pulInterruptMask2 = 0;
; 1135 : break;
; 1136 :
; 1137 : case SYSINTR_ETHER:
; 1138 : *pulInterruptMask1 = 0;
0005c e3a03000 mov r3, #0
00060 e5813000 str r3, [r1]
; 1139 : *pulInterruptMask2 = INT2_ETHERNET;
00064 e3a03080 mov r3, #0x80
; 1140 : break;
00068 ea000041 b |$L15794|
0006c |$L15589|
; 1141 :
; 1142 : case SYSINTR_USB:
; 1143 : *pulInterruptMask1 = 0;
0006c e3a03000 mov r3, #0
00070 e5813000 str r3, [r1]
; 1144 : *pulInterruptMask2 = INT2_USB;
00074 e3a03401 mov r3, #1, 8
; 1145 : break;
00078 ea00003d b |$L15794|
0007c |$L15590|
; 1146 :
; 1147 : case SYSINTR_UART1:
; 1148 : *pulInterruptMask1 = 0;
0007c e3a03000 mov r3, #0
00080 e5813000 str r3, [r1]
; 1149 : *pulInterruptMask2 = INT2_UART1;
00084 e3a03601 mov r3, #1, 12
; 1150 : break;
00088 ea000039 b |$L15794|
0008c |$L15591|
; 1151 :
; 1152 : case SYSINTR_UART2:
; 1153 : *pulInterruptMask1 = 0;
0008c e3a03000 mov r3, #0
00090 e5813000 str r3, [r1]
; 1154 : *pulInterruptMask2 = INT2_UART2;
00094 e3a03501 mov r3, #1, 10
; 1155 : break;
00098 ea000035 b |$L15794|
0009c |$L15592|
; 1156 :
; 1157 : case SYSINTR_UART3:
; 1158 : *pulInterruptMask1 = 0;
0009c e3a03000 mov r3, #0
000a0 e5813000 str r3, [r1]
; 1159 : *pulInterruptMask2 = INT2_UART3;
000a4 e3a03502 mov r3, #2, 10
; 1160 : break;
000a8 ea000031 b |$L15794|
000ac |$L15593|
; 1161 :
; 1162 : case SYSINTR_KEYBOARD:
; 1163 : *pulInterruptMask1 = INT1_KEYPAD;
000ac e3a03202 mov r3, #2, 4
; 1164 : *pulInterruptMask2 = 0;
; 1165 : break;
000b0 ea000029 b |$L15795|
000b4 |$L15594|
; 1166 :
; 1167 : case SYSINTR_SPI:
; 1168 : *pulInterruptMask1 = 0;
000b4 e3a03000 mov r3, #0
000b8 e5813000 str r3, [r1]
; 1169 : *pulInterruptMask2 = INT2_SPI;
000bc e3a03602 mov r3, #2, 12
; 1170 : break;
000c0 ea00002b b |$L15794|
000c4 |$L15595|
; 1171 :
; 1172 : case SYSINTR_RTC_ALARM:
; 1173 : *pulInterruptMask1 = 0;
000c4 e3a03000 mov r3, #0
000c8 e5813000 str r3, [r1]
; 1174 : *pulInterruptMask2 = INT2_RTC;
000cc e3a03020 mov r3, #0x20
; 1175 : break;
000d0 ea000027 b |$L15794|
000d4 |$L15596|
; 1176 :
; 1177 : case SYSINTR_DMA0:
; 1178 : case SYSINTR_DMA1:
; 1179 : //case SYSINTR_DMA2:
; 1180 : //case SYSINTR_DMA3:
; 1181 : //case SYSINTR_DMA4:
; 1182 : //case SYSINTR_DMA5:
; 1183 : //case SYSINTR_DMA6:
; 1184 : //case SYSINTR_DMA7:
; 1185 : //case SYSINTR_DMA8:
; 1186 : //case SYSINTR_DMA9:
; 1187 : *pulInterruptMask1 = INT1_DMAM2P0<< (dwSysIntr - SYSINTR_DMA0);
000d4 e240301f sub r3, r0, #0x1F
000d8 e3a00080 mov r0, #0x80
000dc e1a03310 mov r3, r0, lsl r3
; 1188 : *pulInterruptMask2 = 0;
000e0 e3a00000 mov r0, #0
000e4 e5813000 str r3, [r1]
000e8 e5820000 str r0, [r2]
; 1189 : break;
000ec ea000021 b |$L15584|
000f0 |$L15597|
; 1190 :
; 1191 : case SYSINTR_TOUCH:
; 1192 : *pulInterruptMask1 = INT1_TOUCH;
000f0 e3a03101 mov r3, #1, 2
; 1193 : *pulInterruptMask2 = 0;
; 1194 : break;
000f4 ea000018 b |$L15795|
000f8 |$L15598|
; 1195 :
; 1196 : case SYSINTR_TIMER2:
; 1197 : *pulInterruptMask1 = INT1_TIMER2;
000f8 e3a03020 mov r3, #0x20
; 1198 : *pulInterruptMask2 = 0;
; 1199 : break;
000fc ea000016 b |$L15795|
00100 |$L15599|
; 1200 :
; 1201 : #ifdef EDB9315A_CIR
; 1202 : case SYSINTR_PIO_CIR:
; 1203 : *pulInterruptMask1 = 0;
; 1204 : *pulInterruptMask2 = INT2_GPIO;
; 1205 : break;
; 1206 : #else
; 1207 : case SYSINTR_IR:
; 1208 : *pulInterruptMask1 = 0;
00100 e3a03000 mov r3, #0
00104 e5813000 str r3, [r1]
; 1209 : *pulInterruptMask2 = INT2_IRDA;
00108 e3a03040 mov r3, #0x40
; 1210 : break;
0010c ea000018 b |$L15794|
00110 |$L15600|
; 1211 : #endif
; 1212 : case SYSINTR_IDE:
; 1213 : *pulInterruptMask1 = 0;
00110 e3a03000 mov r3, #0
00114 e5813000 str r3, [r1]
; 1214 : *pulInterruptMask2 = INT2_EXT3;
00118 e3a03c01 mov r3, #1, 24
; 1215 : break;
0011c ea000014 b |$L15794|
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -