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

📄 am29f800.txt

📁 SMDK2442所有设备的驱动测试程序。运行monitor程序
💻 TXT
📖 第 1 页 / 共 4 页
字号:
;;;177    
;;;178        if(manId==0x0001 && devId==0x22bf) return 1; // AM29LV200B
000264  e3540001          CMP      r4,#1
000268  1a000004          BNE      |L1.640|
00026c  e245cd88          SUB      r12,r5,#0x2200
000270  e25cc0bf          SUBS     r12,r12,#0xbf
000274  1a000001          BNE      |L1.640|
000278  e3a00001          MOV      r0,#1
;;;179        else if(manId==0x0001 && devId==0x22ba) return 2; // AM29LV400B
;;;180        else if(manId==0x0001 && devId==0x225b) return 3; // AM29LV800B
;;;181        else if(manId==0x0001 && devId==0x2249) return 4; // AM29LV160B        
;;;182        else if(manId==0x0004 && devId==0x2249) return 4; // 29LV160B fairchild        
;;;183        else return 0;
;;;184    }
                  |L1.636|
00027c  e8bd8038          LDMFD    sp!,{r3-r5,pc}
                  |L1.640|
000280  e3540001          CMP      r4,#1                 ;179
000284  1a000004          BNE      |L1.668|              ;179
000288  e245cd88          SUB      r12,r5,#0x2200        ;179
00028c  e25cc0ba          SUBS     r12,r12,#0xba         ;179
000290  1a000001          BNE      |L1.668|              ;179
000294  e3a00002          MOV      r0,#2                 ;179
000298  eafffff7          B        |L1.636|              ;179
                  |L1.668|
00029c  e3540001          CMP      r4,#1                 ;180
0002a0  1a000004          BNE      |L1.696|              ;180
0002a4  e245cd88          SUB      r12,r5,#0x2200        ;180
0002a8  e25cc05b          SUBS     r12,r12,#0x5b         ;180
0002ac  1a000001          BNE      |L1.696|              ;180
0002b0  e3a00003          MOV      r0,#3                 ;180
0002b4  eafffff0          B        |L1.636|              ;180
                  |L1.696|
0002b8  e3540001          CMP      r4,#1                 ;181
0002bc  1a000004          BNE      |L1.724|              ;181
0002c0  e245cd88          SUB      r12,r5,#0x2200        ;181
0002c4  e25cc049          SUBS     r12,r12,#0x49         ;181
0002c8  1a000001          BNE      |L1.724|              ;181
0002cc  e3a00004          MOV      r0,#4                 ;181
0002d0  eaffffe9          B        |L1.636|              ;181
                  |L1.724|
0002d4  e3540004          CMP      r4,#4                 ;182
0002d8  1a000004          BNE      |L1.752|              ;182
0002dc  e245cd88          SUB      r12,r5,#0x2200        ;182
0002e0  e25cc049          SUBS     r12,r12,#0x49         ;182
0002e4  1a000001          BNE      |L1.752|              ;182
0002e8  e3a00004          MOV      r0,#4                 ;182
0002ec  eaffffe2          B        |L1.636|              ;182
                  |L1.752|
0002f0  e3a00000          MOV      r0,#0                 ;183
0002f4  eaffffe0          B        |L1.636|              ;183
                  |L1.760|
0002f8  00009090          DCD      0x00009090            ;183
                  |L1.764|
0002fc  756e614d          DCB      "Manu"                ;183
000300  74636166          DCB      "fact"                ;183
000304  20657275          DCB      "ure "                ;183
000308  30284449          DCB      "ID(0"                ;183
00030c  30303078          DCB      "x000"                ;183
000310  253d2931          DCB      "1)=%"                ;183
000314  202c7834          DCB      "4x, "                ;183
000318  69766544          DCB      "Devi"                ;183
00031c  49206563          DCB      "ce I"                ;183
000320  78302844          DCB      "D(0x"                ;183
000324  78783232          DCB      "22xx"                ;183
000328  34253d29          DCB      ")=%4"                ;183
00032c  00000a78          DCB      "x\n\0\0"             ;183
                          ENDP

                  InputTargetAddr PROC
;;;108    static void InputTargetAddr(void)
;;;109    {
000330  e92d4008          STMFD    sp!,{r3,lr}
;;;110        static U32 nextTargetAddr=0,nextSrcOffset=0;
;;;111        Uart_Printf("[AM29F800 Writing Program]\n");
000334  e28f00d0          ADR      r0,|L1.1036|
000338  ebfffffe          BL       Uart_Printf
;;;112    
;;;113        Uart_Printf("\nCAUTION: Check AM29LV800 BYTE#(47) pin is connected to VDD.\n");
00033c  e28f00e4          ADR      r0,|L1.1064|
000340  ebfffffe          BL       Uart_Printf
;;;114    
;;;115        Uart_Printf("\nSource size:0h~%xh\n",downloadProgramSize);
000344  e59f011c          LDR      r0,|L1.1128|
000348  e5901000          LDR      r1,[r0,#0]  ; downloadProgramSize
00034c  e28f0f46          ADR      r0,|L1.1132|
000350  ebfffffe          BL       Uart_Printf
;;;116        Uart_Printf("\nAvailable Target/Source Address:\n"); 
000354  e28f0f4a          ADR      r0,|L1.1156|
000358  ebfffffe          BL       Uart_Printf
;;;117        Uart_Printf("    0x0, 0x4000, 0x6000, 0x8000,0x10000,0x20000,0x30000,0x40000,\n");
00035c  e59f0144          LDR      r0,|L1.1192|
000360  ebfffffe          BL       Uart_Printf
;;;118        Uart_Printf("0x50000,0x60000,0x70000,0x80000,0x90000,0xa0000,0xb0000,0xc0000,\n");
000364  e59f0140          LDR      r0,|L1.1196|
000368  ebfffffe          BL       Uart_Printf
;;;119        Uart_Printf("0xd0000,0xe0000,0xf0000\n");
00036c  e28f0f4f          ADR      r0,|L1.1200|
000370  ebfffffe          BL       Uart_Printf
;;;120    
;;;121        Uart_Printf("Input source offset[0x%x]:",nextSrcOffset);
000374  e59f0150          LDR      r0,|L1.1228|
000378  e5901000          LDR      r1,[r0,#0]  ; nextSrcOffset@InputTargetAddr_1
00037c  e28f0f53          ADR      r0,|L1.1232|
000380  ebfffffe          BL       Uart_Printf
;;;122        srcOffset=Uart_GetIntNum();
000384  ebfffffe          BL       Uart_GetIntNum
000388  e59f115c          LDR      r1,|L1.1260|
00038c  e5810000          STR      r0,[r1,#0]  ; srcOffset
;;;123        if(srcOffset==(U32)(-1))srcOffset=nextSrcOffset;
000390  e59f0154          LDR      r0,|L1.1260|
000394  e5900000          LDR      r0,[r0,#0]  ; srcOffset
000398  e3700001          CMN      r0,#1
00039c  1a000003          BNE      |L1.944|
0003a0  e59f0124          LDR      r0,|L1.1228|
0003a4  e5900000          LDR      r0,[r0,#0]  ; nextSrcOffset@InputTargetAddr_1
0003a8  e59f113c          LDR      r1,|L1.1260|
0003ac  e5810000          STR      r0,[r1,#0]  ; srcOffset
;;;124        
;;;125        Uart_Printf("Input target address among above addresses[0x%x]:",nextTargetAddr);
                  |L1.944|
0003b0  e59f0138          LDR      r0,|L1.1264|
0003b4  e5901000          LDR      r1,[r0,#0]  ; nextTargetAddr@InputTargetAddr_0
0003b8  e28f0f4d          ADR      r0,|L1.1268|
0003bc  ebfffffe          BL       Uart_Printf
;;;126        targetAddress=Uart_GetIntNum();
0003c0  ebfffffe          BL       Uart_GetIntNum
0003c4  e59f115c          LDR      r1,|L1.1320|
0003c8  e5810000          STR      r0,[r1,#0]  ; targetAddress
;;;127        if(targetAddress==(U32)(-1))targetAddress=nextTargetAddr;
0003cc  e59f0154          LDR      r0,|L1.1320|
0003d0  e5900000          LDR      r0,[r0,#0]  ; targetAddress
0003d4  e3700001          CMN      r0,#1
0003d8  1a000003          BNE      |L1.1004|
0003dc  e59f010c          LDR      r0,|L1.1264|
0003e0  e5900000          LDR      r0,[r0,#0]  ; nextTargetAddr@InputTargetAddr_0
0003e4  e59f113c          LDR      r1,|L1.1320|
0003e8  e5810000          STR      r0,[r1,#0]  ; targetAddress
;;;128     
;;;129        if(targetAddress<0x4000)targetSize=0x4000;
                  |L1.1004|
0003ec  e59f0134          LDR      r0,|L1.1320|
0003f0  e5900000          LDR      r0,[r0,#0]  ; targetAddress
0003f4  e3500c40          CMP      r0,#0x4000
0003f8  2a00004c          BCS      |L1.1328|
0003fc  e3a00c40          MOV      r0,#0x4000
000400  e59f1124          LDR      r1,|L1.1324|
000404  e5810000          STR      r0,[r1,#0]  ; targetSize
000408  ea000063          B        |L1.1436|
                  |L1.1036|
00040c  324d415b          DCB      "[AM2"
000410  30384639          DCB      "9F80"
000414  72572030          DCB      "0 Wr"
000418  6e697469          DCB      "itin"
00041c  72502067          DCB      "g Pr"
000420  6172676f          DCB      "ogra"
000424  000a5d6d          DCB      "m]\n\0"
                  |L1.1064|
000428  5541430a          DCB      "\nCAU"
00042c  4e4f4954          DCB      "TION"
000430  6843203a          DCB      ": Ch"
000434  206b6365          DCB      "eck "
000438  39324d41          DCB      "AM29"
00043c  3038564c          DCB      "LV80"
000440  59422030          DCB      "0 BY"
000444  28234554          DCB      "TE#("
000448  20293734          DCB      "47) "
00044c  206e6970          DCB      "pin "
000450  63207369          DCB      "is c"
000454  656e6e6f          DCB      "onne"
000458  64657463          DCB      "cted"
00045c  206f7420          DCB      " to "
000460  2e444456          DCB      "VDD."
000464  0000000a          DCB      "\n\0\0\0"
                  |L1.1128|
000468  00000000          DCD      downloadProgramSize
                  |L1.1132|
00046c  756f530a          DCB      "\nSou"
000470  20656372          DCB      "rce "
000474  657a6973          DCB      "size"
000478  7e68303a          DCB      ":0h~"
00047c  0a687825          DCB      "%xh\n"
000480  00000000          DCB      "\0\0\0\0"
                  |L1.1156|
000484  6176410a          DCB      "\nAva"
000488  62616c69          DCB      "ilab"
00048c  5420656c          DCB      "le T"
000490  65677261          DCB      "arge"
000494  6f532f74          DCB      "t/So"
000498  65637275          DCB      "urce"
00049c  64644120          DCB      " Add"
0004a0  73736572          DCB      "ress"
0004a4  00000a3a          DCB      ":\n\0\0"
                  |L1.1192|
0004a8  00000000          DCD      ||.constdata$1||
                  |L1.1196|
0004ac  00000044          DCD      ||.constdata$1|| + 68
                  |L1.1200|
0004b0  30647830          DCB      "0xd0"
0004b4  2c303030          DCB      "000,"
0004b8  30657830          DCB      "0xe0"
0004bc  2c303030          DCB      "000,"
0004c0  30667830          DCB      "0xf0"
0004c4  0a303030          DCB      "000\n"
0004c8  00000000          DCB      "\0\0\0\0"
                  |L1.1228|
0004cc  00000004          DCD      ||.bss$2|| + 4
                  |L1.1232|
0004d0  75706e49          DCB      "Inpu"
0004d4  6f732074          DCB      "t so"
0004d8  65637275          DCB      "urce"
0004dc  66666f20          DCB      " off"
0004e0  5b746573          DCB      "set["
0004e4  78257830          DCB      "0x%x"
0004e8  00003a5d          DCB      "]:\0\0"
                  |L1.1260|
0004ec  0000000c          DCD      ||.bss$2|| + 12
                  |L1.1264|
0004f0  00000000          DCD      ||.bss$2||
                  |L1.1268|
0004f4  75706e49          DCB      "Inpu"
0004f8  61742074          DCB      "t ta"
0004fc  74656772          DCB      "rget"
000500  64646120          DCB      " add"
000504  73736572          DCB      "ress"
000508  6f6d6120          DCB      " amo"
00050c  6120676e          DCB      "ng a"
000510  65766f62          DCB      "bove"
000514  64646120          DCB      " add"
000518  73736572          DCB      "ress"
00051c  305b7365          DCB      "es[0"
000520  5d782578          DCB      "x%x]"
000524  0000003a          DCB      ":\0\0\0"
                  |L1.1320|
000528  00000010          DCD      ||.bss$2|| + 16
                  |L1.1324|
00052c  00000014          DCD      ||.bss$2|| + 20
;;;130        else if(targetAddress<0x6000)targetSize=0x2000;
                  |L1.1328|
000530  e51f0010          LDR      r0,|L1.1320|
000534  e5900000          LDR      r0,[r0,#0]  ; targetAddress
000538  e3500c60          CMP      r0,#0x6000
00053c  2a000003          BCS      |L1.1360|
000540  e3a00d80          MOV      r0,#0x2000
000544  e51f1020          LDR      r1,|L1.1324|
000548  e5810000          STR      r0,[r1,#0]  ; targetSize
00054c  ea000012          B        |L1.1436|
;;;131        else if(targetAddress<0x8000)targetSize=0x2000;
                  |L1.1360|
000550  e51f0030          LDR      r0,|L1.1320|
000554  e5900000          LDR      r0,[r0,#0]  ; targetAddress
000558  e3500c80          CMP      r0,#0x8000
00055c  2a000003          BCS      |L1.1392|
000560  e3a00d80          MOV      r0,#0x2000
000564  e51f1040          LDR      r1,|L1.1324|
000568  e5810000          STR      r0,[r1,#0]  ; targetSize
00056c  ea00000a          B        |L1.1436|
;;;132        else if(targetAddress<0x10000)targetSize=0x8000; 
                  |L1.1392|
000570  e51f0050          LDR      r0,|L1.1320|
000574  e5900000          LDR      r0,[r0,#0]  ; targetAddress
000578  e3500b40          CMP      r0,#0x10000
00057c  2a000003          BCS      |L1.1424|
000580  e3a00c80          MOV      r0,#0x8000
000584  e51f1060          LDR      r1,|L1.1324|
000588  e5810000          STR      r0,[r1,#0]  ; targetSize
00058c  ea000002          B        |L1.1436|
;;;133        else targetSize=0x10000;
                  |L1.1424|
000590  e3a00b40          MOV      r0,#0x10000
000594  e51f1070          LDR      r1,|L1.1324|
000598  e5810000          STR      r0,[r1,#0]  ; targetSize
;;;134    
;;;135        Uart_Printf("source offset=0x%x\n",srcOffset);
                  |L1.1436|
00059c  e51f00b8          LDR      r0,|L1.1260|
0005a0  e5901000          LDR      r1,[r0,#0]  ; srcOffset
0005a4  e28f0f53          ADR      r0,|L1.1784|
0005a8  ebfffffe          BL       Uart_Printf
;;;136        Uart_Printf("target address=0x%x\n",targetAddress);

⌨️ 快捷键说明

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