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

📄 oempreinit.cod

📁 EP9315的BSP包(WINCE下的BSP,内有各种驱动的详细的代码)
💻 COD
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 12.20.9615 

	TTL	d:\wince420\platform\ep931x\kernel\hal\.\oempreinit.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "

	EXPORT	|SysconSetup|
; File d:\wince420\platform\ep931x\kernel\hal\oempreinit.c

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

  00000			 AREA	 |.pdata$$SysconSetup|, PDATA, SELECTION=5, ASSOC=|.text| { |SysconSetup| } ; comdat associative
|$T191|	DCD	|SysconSetup|
	DCD	0x40003f01
; Function compile flags: /Ogsy

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

  00000		 |SysconSetup| PROC

; 37   : {

  00000	e92d4010	 stmdb     sp!, {r4, lr}
  00004		 |$M189|

; 38   :     //
; 39   :     // Disable the watchdog timer.
; 40   :     //
; 41   :     *WATCHDOG_WDCONTROL = WDCONTROL_DISABLE;
; 42   : 
; 43   :     //
; 44   :     // According to the E28F128J3_150 specification. The timings are as follows:
; 45   :     //
; 46   :     // 150 ns    Memory access time.
; 47   :     // 35  ns    Sequentail access time.
; 48   :     // 1 HClock  Read to Write Turn around time
; 49   :     //
; 50   :     *SMC_SMCBCR6    = (( WAIT_STATES(35) <<SMCBCR_WST2_SHIFT) & SMCBCR_WST2_MASK) | 
; 51   :                       (( WAIT_STATES(150) <<SMCBCR_WST1_SHIFT) & SMCBCR_WST1_MASK) |
; 52   :                       ( 1 & SMCBCR_IDCY_MASK ) |  SMCBCR_MW_32BIT | SMCBCR_WP  |
; 53   :                        SMCBCR_PME | SMCBCR_RBLE;

  00004	e59f20ec	 ldr       r2, [pc, #0xEC]
  00008	e3a01102	 mov       r1, #2, 2

; 54   : 
; 55   : 
; 56   :     //
; 57   :     // Program the processor/bus clock rate.
; 58   :     //
; 59   :     *CSC_SYSLOCK = 0xAA;

  0000c	e59f40e0	 ldr       r4, [pc, #0xE0]
  00010	e3a00caa	 mov       r0, #0xAA, 24
  00014	e3800055	 orr       r0, r0, #0x55
  00018	e3811725	 orr       r1, r1, #0x25, 14
  0001c	e5810000	 str       r0, [r1]
  00020	e3a030aa	 mov       r3, #0xAA
  00024	e59f00c4	 ldr       r0, [pc, #0xC4]

; 60   :     *CSC_CLKSET1 = CLKSET1_VALUE; 

  00028	e59f10bc	 ldr       r1, [pc, #0xBC]
  0002c	e5820000	 str       r0, [r2]
  00030	e59f00b0	 ldr       r0, [pc, #0xB0]
  00034	e5843000	 str       r3, [r4]
  00038	e5810000	 str       r0, [r1]

; 61   : 
; 62   :     //
; 63   :     // Flush the pipeline.
; 64   :     //    
; 65   :     __emit(0xe1a00000);

  0003c	e1a00000	 mov       r0, r0

; 66   :     __emit(0xe1a00000);

  00040	e1a00000	 mov       r0, r0

; 67   :     __emit(0xe1a00000);

  00044	e1a00000	 mov       r0, r0

; 68   :     __emit(0xe1a00000);

  00048	e1a00000	 mov       r0, r0

; 69   :     __emit(0xe1a00000);

  0004c	e1a00000	 mov       r0, r0

; 70   :     __emit(0xe1a00000);

  00050	e1a00000	 mov       r0, r0

; 71   : 
; 72   : 
; 73   :     //
; 74   :     // Configure PLL2 in order to generate a solid 48Mhz clock for USB.
; 75   :     //
; 76   :     *CSC_SYSLOCK = 0xAA;
; 77   :     *CSC_CLKSET2 = CLKSET2_VALUE; 

  00054	e59f1088	 ldr       r1, [pc, #0x88]
  00058	e59f0080	 ldr       r0, [pc, #0x80]

; 78   : 
; 79   :     //
; 80   :     // Enable all of the UARTS.
; 81   :     //
; 82   :     *CSC_SYSLOCK =  0xAA;
; 83   :     *CSC_DEVCFG  =  DEVCFG_U1EN | DEVCFG_U2EN  | DEVCFG_U3EN | DEVCFG_IONU2 | DEVCFG_TIN;
; 84   : 
; 85   :     //
; 86   :     // Change the Bus master register to use bus priority 2 so that raster is stable.
; 87   :     // This also puts dma at the top so audio does not break up.
; 88   :     //
; 89   :     *CSC_SYSLOCK =  0xAA;
; 90   :     *CSC_BMAR    =  2;

  0005c	e3a02002	 mov       r2, #2
  00060	e5843000	 str       r3, [r4]
  00064	e5810000	 str       r0, [r1]
  00068	e3a00411	 mov       r0, #0x11, 8
  0006c	e59f1068	 ldr       r1, [pc, #0x68]
  00070	e3800816	 orr       r0, r0, #0x16, 16
  00074	e5843000	 str       r3, [r4]
  00078	e5810000	 str       r0, [r1]
  0007c	e59f0054	 ldr       r0, [pc, #0x54]
  00080	e5843000	 str       r3, [r4]
  00084	e5802000	 str       r2, [r0]

; 91   : 
; 92   :     //
; 93   :     // Program the sdram refresh to a new value.
; 94   :     //
; 95   :     *SDRAM_REFRESH = SDRAM_REFRESH_VALUE;

  00088	e3a00fc6	 mov       r0, #0xC6, 30
  0008c	e59f1040	 ldr       r1, [pc, #0x40]
  00090	e5810000	 str       r0, [r1]

; 96   : 
; 97   :     //
; 98   :     // Program the power control register to use all dma channels.
; 99   :     //
; 100  :     //ulPwrcnt = *CSC_PWRCNT;
; 101  :     *CSC_SYSLOCK = 0xAA;
; 102  :     *CSC_PWRCNT  = PWRCNT_DMAM2MCH0   | PWRCNT_DMAM2PCH1 | PWRCNT_DMAM2PCH0;

  00094	e3a00301	 mov       r0, #1, 6
  00098	e59f1030	 ldr       r1, [pc, #0x30]
  0009c	e3800803	 orr       r0, r0, #3, 16
  000a0	e5843000	 str       r3, [r4]
  000a4	e5810000	 str       r0, [r1]

; 103  : 
; 104  : //                  PWRCNT_DMAM2PCH3 | PWRCNT_DMAM2PCH2 | PWRCNT_DMAM2PCH5 | 
; 105  : //                  PWRCNT_DMAM2PCH4 | PWRCNT_DMAM2PCH7 | PWRCNT_DMAM2PCH6 |
; 106  : //                  PWRCNT_DMAM2PCH9 | PWRCNT_DMAM2PCH8;
; 107  : 
; 108  :     //
; 109  :     // Program up the SSP register.
; 110  :     //
; 111  :     *SPI_CPSR   = 2;
; 112  : 
; 113  : 
; 114  :     //
; 115  :     // Program the Touch Screen enable register.
; 116  :     //
; 117  :     *CSC_SYSLOCK    = 0xAA;
; 118  :     *CSC_KTDIV      = KTDIV_TSEN;

  000a8	e3a00102	 mov       r0, #2, 2
  000ac	e59f1018	 ldr       r1, [pc, #0x18]
  000b0	e5812000	 str       r2, [r1]
  000b4	e59f100c	 ldr       r1, [pc, #0xC]
  000b8	e5843000	 str       r3, [r4]
  000bc	e5810000	 str       r0, [r1]

; 119  :  
; 120  : }

  000c0	e8bd4010	 ldmia     sp!, {r4, lr}
  000c4	e12fff1e	 bx        lr
  000c8		 |$L193|
  000c8	80930090	 DCD       0x80930090
  000cc	808a0010	 DCD       0x808a0010
  000d0	80930004	 DCD       0x80930004
  000d4	80060008	 DCD       0x80060008
  000d8	80930054	 DCD       0x80930054
  000dc	80930080	 DCD       0x80930080
  000e0	300dc317	 DCD       0x300dc317
  000e4	80930024	 DCD       0x80930024
  000e8	02a4a3d7	 DCD       0x2a4a3d7
  000ec	80930020	 DCD       0x80930020
  000f0	2c001dc1	 DCD       0x2c001dc1
  000f4	809300c0	 DCD       0x809300c0
  000f8	80080018	 DCD       0x80080018
  000fc		 |$M190|

			 ENDP  ; |SysconSetup|

	END

⌨️ 快捷键说明

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