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

📄 intel_j3_2x16.cod

📁 EP9315的BSP包(WINCE下的BSP,内有各种驱动的详细的代码)
💻 COD
📖 第 1 页 / 共 3 页
字号:
; 199  :         // Clear the lock bits if the flash block was locked.
; 200  :         //
; 201  :         *gpulCurAddr = FLASH_LOCK_BIT;

  000a0	e5950000	 ldr       r0, [r5]
  000a4	e5801000	 str       r1, [r0]

; 202  :         *gpulCurAddr = FLASH_LOCK_CLEAR;

  000a8	e3a0060d	 mov       r0, #0xD, 12
  000ac	e5951000	 ldr       r1, [r5]
  000b0	e38000d0	 orr       r0, r0, #0xD0
  000b4	e5810000	 str       r0, [r1]

; 203  :         *gpulCurAddr = FLASH_READ_STATUS;

  000b8	e3a01607	 mov       r1, #7, 12
  000bc	e5950000	 ldr       r0, [r5]
  000c0	e3811070	 orr       r1, r1, #0x70
  000c4	e5801000	 str       r1, [r0]

; 204  : 
; 205  :         gbUnlocked  = TRUE;

  000c8	e5842000	 str       r2, [r4]
  000cc		 |$L36616|

; 206  :     }
; 207  : }

  000cc	e8bd4030	 ldmia     sp!, {r4, r5, lr}
  000d0	e12fff1e	 bx        lr
  000d4		 |$L36751|
  000d4	00000000	 DCD       |gbUnlocked|
  000d8	00000000	 DCD       |gpulCurAddr|
  000dc	00000000	 DCD       |gdwStartAddr|
  000e0		 |$M36748|

			 ENDP  ; |ContinueEraseFlashJ3_2x16|

	EXPORT	|FinishEraseFlashJ3_2x16|
	EXPORT	|??_C@_01PJCK@?4?$AA@| [ DATA ]		; `string'

  00000			 AREA	 |.text| { |FinishEraseFlashJ3_2x16| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$FinishEraseFlashJ3_2x16|, PDATA, SELECTION=5, ASSOC=|.text| { |FinishEraseFlashJ3_2x16| } ; comdat associative
|$T36764| DCD	|FinishEraseFlashJ3_2x16|
	DCD	0x40006901

  00000			 AREA	 |.rdata| { |??_C@_01PJCK@?4?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_01PJCK@?4?$AA@| DCB ".", 0x0			; `string'
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |FinishEraseFlashJ3_2x16| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |FinishEraseFlashJ3_2x16| PROC

; 216  : {

  00000	e92d4ff0	 stmdb     sp!, {r4 - r11, lr}
  00004		 |$M36762|

; 217  :     BOOL    bSuccess;
; 218  :     //
; 219  :     // Check to see if the flash has been completely erased. If so just
; 220  :     // return.
; 221  :     //
; 222  :     if(gbFlashEraseComplete)

  00004	e59f6194	 ldr       r6, [pc, #0x194]
  00008	e596000c	 ldr       r0, [r6, #0xC]
  0000c	e3500000	 cmp       r0, #0

; 223  :     {
; 224  :         return TRUE;

  00010	13a07001	 movne     r7, #1
  00014	1a00005b	 bne       |$L36620|

; 225  :     }
; 226  : 
; 227  :     //
; 228  :     // Wait for the Flash block command to succed.
; 229  :     //
; 230  :     bSuccess = WaitForReady(gpulCurAddr, 10000, EXT_STATUS_WBUFFER_READY);

  00018	e59f517c	 ldr       r5, [pc, #0x17C]
  0001c	e3a02502	 mov       r2, #2, 10
  00020	e3a01c27	 mov       r1, #0x27, 24
  00024	e5950000	 ldr       r0, [r5]
  00028	e3822080	 orr       r2, r2, #0x80
  0002c	e3811010	 orr       r1, r1, #0x10
  00030	eb000000	 bl        WaitForReady
  00034	e1b07000	 movs      r7, r0

; 231  :     if(bSuccess == FALSE)
; 232  :     {
; 233  :         return FALSE;

  00038	0a00001b	 beq       |$L36761|

; 234  :     }
; 235  :     *gpulCurAddr  = FLASH_CLEAR_STATUS;

  0003c	e3a0b605	 mov       r11, #5, 12
  00040	e5950000	 ldr       r0, [r5]

; 236  : 
; 237  : 
; 238  :     //
; 239  :     // Erase the block before unlocking the next block.
; 240  :     //
; 241  :     if(gbUnlocked)

  00044	e59f414c	 ldr       r4, [pc, #0x14C]
  00048	e38bb050	 orr       r11, r11, #0x50
  0004c	e580b000	 str       r11, [r0]
  00050	e3a08602	 mov       r8, #2, 12
  00054	e5940000	 ldr       r0, [r4]
  00058	e3a0960d	 mov       r9, #0xD, 12
  0005c	e3a0a607	 mov       r10, #7, 12
  00060	e3888020	 orr       r8, r8, #0x20
  00064	e38990d0	 orr       r9, r9, #0xD0
  00068	e38aa070	 orr       r10, r10, #0x70
  0006c	e3500000	 cmp       r0, #0
  00070	0a00003e	 beq       |$L36754|

; 242  :     {
; 243  :         //
; 244  :         // Erase the flash block
; 245  :         //
; 246  :         *gpulCurAddr = FLASH_BLOCK_ERASE;

  00074	e5950000	 ldr       r0, [r5]

; 247  :         *gpulCurAddr = FLASH_BLOCK_ERASE_RESUME;
; 248  : 
; 249  :         //
; 250  :         // Read erase status.
; 251  :         //
; 252  :         *gpulCurAddr = FLASH_READ_STATUS;
; 253  : 
; 254  :         //
; 255  :         // Wait for the Flash block command to succed.
; 256  :         //
; 257  :         bSuccess = WaitForReady(gpulCurAddr, 10000, EXT_STATUS_WBUFFER_READY);

  00078	e3a02502	 mov       r2, #2, 10
  0007c	e3822080	 orr       r2, r2, #0x80
  00080	e5808000	 str       r8, [r0]
  00084	e5951000	 ldr       r1, [r5]
  00088	e5819000	 str       r9, [r1]
  0008c	e3a01c27	 mov       r1, #0x27, 24
  00090	e5950000	 ldr       r0, [r5]
  00094	e3811010	 orr       r1, r1, #0x10
  00098	e580a000	 str       r10, [r0]
  0009c	e5950000	 ldr       r0, [r5]
  000a0	eb000000	 bl        WaitForReady
  000a4	e1b07000	 movs      r7, r0

; 258  :         if(bSuccess == FALSE)

  000a8	1a000001	 bne       |$L36625|
  000ac		 |$L36761|

; 259  :         {
; 260  :             return FALSE;

  000ac	e3a07000	 mov       r7, #0
  000b0	ea000034	 b         |$L36620|
  000b4		 |$L36625|

; 261  :         }
; 262  : 
; 263  :         *gpulCurAddr    = FLASH_CLEAR_STATUS;

  000b4	e5950000	 ldr       r0, [r5]

; 264  :         gbUnlocked      = FALSE;

  000b8	e3a01000	 mov       r1, #0
  000bc	e580b000	 str       r11, [r0]

; 265  : 
; 266  :         //
; 267  :         // Increment to the next block.
; 268  :         //
; 269  :         gpulCurAddr += FLASH_BLOCK_SIZE>>2;

  000c0	e5950000	 ldr       r0, [r5]
  000c4	e5841000	 str       r1, [r4]
  000c8	e2801701	 add       r1, r0, #1, 14
  000cc	e5851000	 str       r1, [r5]

; 270  :     }
; 271  : 
; 272  : 
; 273  :     //
; 274  :     // Erase the Flash
; 275  :     //
; 276  :     while((DWORD)gpulCurAddr < (gdwStartAddr + gdwLength))

  000d0	ea000026	 b         |$L36754|
  000d4		 |$L36628|

; 277  :     {
; 278  : 
; 279  :         //
; 280  :         // Clear the lock bits if the flash block was locked.
; 281  :         //
; 282  :         *gpulCurAddr = FLASH_LOCK_BIT;

  000d4	e3a01606	 mov       r1, #6, 12
  000d8	e5950000	 ldr       r0, [r5]
  000dc	e3811060	 orr       r1, r1, #0x60
  000e0	e5801000	 str       r1, [r0]

; 283  :         *gpulCurAddr = FLASH_LOCK_CLEAR;
; 284  :         *gpulCurAddr = FLASH_READ_STATUS;
; 285  : 
; 286  :         //
; 287  :         // Wait for the Flash block command to succed.
; 288  :         //
; 289  :         bSuccess = WaitForReady(gpulCurAddr, 10000, EXT_STATUS_WBUFFER_READY);

  000e4	e3a02502	 mov       r2, #2, 10
  000e8	e5950000	 ldr       r0, [r5]
  000ec	e3822080	 orr       r2, r2, #0x80
  000f0	e5809000	 str       r9, [r0]
  000f4	e5951000	 ldr       r1, [r5]
  000f8	e581a000	 str       r10, [r1]
  000fc	e3a01c27	 mov       r1, #0x27, 24
  00100	e5950000	 ldr       r0, [r5]
  00104	e3811010	 orr       r1, r1, #0x10
  00108	eb000000	 bl        WaitForReady
  0010c	e1b07000	 movs      r7, r0

; 290  :         *gpulCurAddr  = FLASH_CLEAR_STATUS;

  00110	e5950000	 ldr       r0, [r5]
  00114	e580b000	 str       r11, [r0]

; 291  :         
; 292  :         if(!bSuccess)

  00118	0a00001a	 beq       |$L36620|

; 293  :         {
; 294  :             break;
; 295  :         }
; 296  : 
; 297  : 
; 298  :         //
; 299  :         // Erase the flash block
; 300  :         //
; 301  :         *gpulCurAddr = FLASH_BLOCK_ERASE;

  0011c	e5950000	 ldr       r0, [r5]

; 302  :         *gpulCurAddr = FLASH_BLOCK_ERASE_RESUME;
; 303  :         *gpulCurAddr = FLASH_READ_STATUS;
; 304  :         
; 305  :         //
; 306  :         // Wait for the Flash block command to succed.
; 307  :         //
; 308  :         bSuccess = WaitForReady(gpulCurAddr, 10000, EXT_STATUS_WBUFFER_READY);

  00120	e3a02502	 mov       r2, #2, 10
  00124	e3822080	 orr       r2, r2, #0x80
  00128	e5808000	 str       r8, [r0]
  0012c	e5951000	 ldr       r1, [r5]
  00130	e5819000	 str       r9, [r1]
  00134	e3a01c27	 mov       r1, #0x27, 24
  00138	e5950000	 ldr       r0, [r5]
  0013c	e3811010	 orr       r1, r1, #0x10
  00140	e580a000	 str       r10, [r0]
  00144	e5950000	 ldr       r0, [r5]
  00148	eb000000	 bl        WaitForReady
  0014c	e1b07000	 movs      r7, r0

; 309  :         *gpulCurAddr  = FLASH_CLEAR_STATUS;

  00150	e5950000	 ldr       r0, [r5]
  00154	e580b000	 str       r11, [r0]

; 310  :         
; 311  :         if(!bSuccess)

  00158	0a00000a	 beq       |$L36620|

; 312  :         {
; 313  :             break;
; 314  :         }
; 315  : 
; 316  :         //
; 317  :         // Occasionally write out a dot so they don't think
; 318  :         // the system is dead.
; 319  :         //
; 320  :         EdbgOutputDebugString(".");

  0015c	e59f0030	 ldr       r0, [pc, #0x30]
  00160	eb000000	 bl        EdbgOutputDebugString

; 321  :         
; 322  :         //
; 323  :         // Increment to the next block.
; 324  :         //
; 325  :         gpulCurAddr += FLASH_BLOCK_SIZE>>2;

  00164	e5953000	 ldr       r3, [r5]
  00168	e2830701	 add       r0, r3, #1, 14
  0016c	e5850000	 str       r0, [r5]
  00170		 |$L36754|
  00170	e5961004	 ldr       r1, [r6, #4]
  00174	e5960000	 ldr       r0, [r6]
  00178	e0812000	 add       r2, r1, r0
  0017c	e5951000	 ldr       r1, [r5]
  00180	e1510002	 cmp       r1, r2
  00184	3affffd2	 bcc       |$L36628|
  00188		 |$L36620|

; 223  :     {
; 224  :         return TRUE;

  00188	e1a00007	 mov       r0, r7

; 326  :     }        
; 327  :     return bSuccess;
; 328  : }

  0018c	e8bd4ff0	 ldmia     sp!, {r4 - r11, lr}
  00190	e12fff1e	 bx        lr
  00194		 |$L36766|
  00194	00000000	 DCD       |??_C@_01PJCK@?4?$AA@|
  00198	00000000	 DCD       |gbUnlocked|
  0019c	00000000	 DCD       |gpulCurAddr|
  001a0	00000000	 DCD       |gdwStartAddr|
  001a4		 |$M36763|

			 ENDP  ; |FinishEraseFlashJ3_2x16|

	EXPORT	|WriteFlashJ3_2x16|
	EXPORT	|??_C@_0CB@EOBJ@FLASH_WRITE_TO_BUFFER?5?9?5Failed?6?4@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BI@EAHE@pulBlockAddress?5?5?$DN?5?$CFx?4?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0BI@IGBC@?$CKpulBlockAddress?5?$DN?5?$CFx?4?6?$AA@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CK@GEFO@?$CKFLASH_READ_STATUS?5pulBlockAddre@| [ DATA ] ; `string'
	EXPORT	|??_C@_0CG@BLFF@FLASH_BLOCK_PROGRAM_RESUME?5?9?5Fai@| [ DATA ] ; `string'
	IMPORT	|GetSystemTimeInMsec|
	IMPORT	|DelayInuSec|

  00000			 AREA	 |.text| { |WriteFlashJ3_2x16| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$WriteFlashJ3_2x16|, PDATA, SELECTION=5, ASSOC=|.text| { |WriteFlashJ3_2x16| } ; comdat associative
|$T36788| DCD	|WriteFlashJ3_2x16|
	DCD	0x40007a02

  00000			 AREA	 |.rdata| { |??_C@_0CB@EOBJ@FLASH_WRITE_TO_BUFFER?5?9?5Failed?6?4@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CB@EOBJ@FLASH_WRITE_TO_BUFFER?5?9?5Failed?6?4@| DCB "FLASH_WRITE_"
	DCB	"TO_BUFFER - Failed", 0xa, ".", 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BI@EAHE@pulBlockAddress?5?5?$DN?5?$CFx?4?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BI@EAHE@pulBlockAddress?5?5?$DN?5?$CFx?4?6?$AA@| DCB "pulBlockAdd"
	DCB	"ress  = %x.", 0xa, 0x0			; `string'

  00000			 AREA	 |.rdata| { |??_C@_0BI@IGBC@?$CKpulBlockAddress?5?$DN?5?$CFx?4?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BI@IGBC@?$CKpulBlockAddress?5?$DN?5?$CFx?4?6?$AA@| DCB "*pulBlock"
	DCB	"Address = %x.", 0xa, 0x0		; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CK@GEFO@?$CKFLASH_READ_STATUS?5pulBlockAddre@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CK@GEFO@?$CKFLASH_READ_STATUS?5pulBlockAddre@| DCB "*FLASH_READ_S"
	DCB	"TATUS pulBlockAddress = %x.", 0xa, 0x0	; `string'

  00000			 AREA	 |.rdata| { |??_C@_0CG@BLFF@FLASH_BLOCK_PROGRAM_RESUME?5?9?5Fai@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CG@BLFF@FLASH_BLOCK_PROGRAM_RESUME?5?9?5Fai@| DCB "FLASH_BLOCK_PR"
	DCB	"OGRAM_RESUME - Failed", 0xa, ".", 0x0	; `string'
; Function compile flags: /Ogsy

  00000			 AREA	 |.text| { |WriteFlashJ3_2x16| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |WriteFlashJ3_2x16| PROC

; 348  : {

  00000	e92d43f0	 stmdb     sp!, {r4 - r9, lr}
  00004	e24dd00c	 sub       sp, sp, #0xC
  00008		 |$M36786|
  00008	e1a07002	 mov       r7, r2

; 349  :     ULONG               ulCount;
; 350  :     ULONG               ulEndCount;
; 351  :     volatile PULONG     pulBlockAddress;
; 352  :     volatile PULONG     pulDest, pulSource;
; 353  :     USHORT              usWordsToWrite;
; 354  :     ULONG               ulStart,ulCurrent;
; 355  :     BOOL                bSuccess;
; 356  :     ULONG               ulAddDelay;
; 357  : 
; 358  :     ulCount     = 0;

⌨️ 快捷键说明

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