1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup RTEMSBSPsARMLPC24XX |
---|
5 | * |
---|
6 | * @brief BSP start EMC static memory configuration. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2011 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #include <bsp/start-config.h> |
---|
18 | #include <bsp/lpc24xx.h> |
---|
19 | |
---|
20 | BSP_START_DATA_SECTION const lpc24xx_emc_static_chip_config |
---|
21 | lpc24xx_start_config_emc_static_chip [] = { |
---|
22 | #if defined(LPC24XX_EMC_M29W160E) |
---|
23 | /* |
---|
24 | * Static Memory 1: Numonyx M29W160EB |
---|
25 | * |
---|
26 | * 1 clock cycle = 1/72MHz = 13.9ns |
---|
27 | */ |
---|
28 | { |
---|
29 | .chip_select = (volatile lpc_emc_static *) EMC_STA_BASE_1, |
---|
30 | .config = { |
---|
31 | /* |
---|
32 | * 16 bit, page mode disabled, active LOW chip select, extended wait |
---|
33 | * disabled, writes not protected, byte lane state LOW/LOW (!). |
---|
34 | */ |
---|
35 | .config = 0x81, |
---|
36 | |
---|
37 | /* 1 clock cycles delay from the chip select 1 to the write enable */ |
---|
38 | .waitwen = 0, |
---|
39 | |
---|
40 | /* |
---|
41 | * 0 clock cycles delay from the chip select 1 or address change |
---|
42 | * (whichever is later) to the output enable |
---|
43 | */ |
---|
44 | .waitoen = 0, |
---|
45 | |
---|
46 | /* 7 clock cycles delay from the chip select 1 to the read access */ |
---|
47 | .waitrd = 0x6, |
---|
48 | |
---|
49 | /* |
---|
50 | * 32 clock cycles delay for asynchronous page mode sequential accesses |
---|
51 | */ |
---|
52 | .waitpage = 0x1f, |
---|
53 | |
---|
54 | /* 5 clock cycles delay from the chip select 1 to the write access */ |
---|
55 | .waitwr = 0x3, |
---|
56 | |
---|
57 | /* 16 bus turnaround cycles */ |
---|
58 | .waitrun = 0xf |
---|
59 | } |
---|
60 | } |
---|
61 | #elif defined(LPC24XX_EMC_M29W320E70) |
---|
62 | /* Static Memory 0: M29W320E70 */ |
---|
63 | { |
---|
64 | .chip_select = (volatile lpc_emc_static *) EMC_STA_BASE_0, |
---|
65 | .config = { |
---|
66 | /* |
---|
67 | * 16 bit, page mode disabled, active LOW chip select, extended wait |
---|
68 | * disabled, writes not protected, byte lane state LOW/LOW. |
---|
69 | */ |
---|
70 | .config = 0x81, |
---|
71 | |
---|
72 | /* 30ns (tWHWL) */ |
---|
73 | .waitwen = LPC24XX_PS_TO_EMCCLK(30000, 1), |
---|
74 | |
---|
75 | /* 0ns */ |
---|
76 | .waitoen = LPC24XX_PS_TO_EMCCLK(0, 1), |
---|
77 | |
---|
78 | /* 70ns (tAVQV, tELQV) */ |
---|
79 | .waitrd = LPC24XX_PS_TO_EMCCLK(70000, 1), |
---|
80 | |
---|
81 | /* 70ns (tAVQV, tELQV) */ |
---|
82 | .waitpage = LPC24XX_PS_TO_EMCCLK(70000, 1), |
---|
83 | |
---|
84 | /* max(30ns (tWHWL) + 45ns (tWLWH), 70ns (tAVAV)) */ |
---|
85 | .waitwr = LPC24XX_PS_TO_EMCCLK(75000, 2), |
---|
86 | |
---|
87 | /* 25ns (tEHQZ) */ |
---|
88 | .waitrun = LPC24XX_PS_TO_EMCCLK(25000, 1) |
---|
89 | } |
---|
90 | } |
---|
91 | #elif defined(LPC24XX_EMC_SST39VF3201) |
---|
92 | /* Static Memory 0: SST39VF3201 */ |
---|
93 | { |
---|
94 | .chip_select = (volatile lpc_emc_static *) EMC_STA_BASE_0, |
---|
95 | .config = { |
---|
96 | /* |
---|
97 | * 16 bit, page mode disabled, active LOW chip select, extended wait |
---|
98 | * disabled, writes not protected, byte lane state LOW/LOW. |
---|
99 | */ |
---|
100 | .config = 0x81, |
---|
101 | |
---|
102 | /* 0ns (tCS, tAS) */ |
---|
103 | .waitwen = LPC24XX_PS_TO_EMCCLK(0, 1), |
---|
104 | |
---|
105 | /* 0ns (tOES) */ |
---|
106 | .waitoen = LPC24XX_PS_TO_EMCCLK(0, 1), |
---|
107 | |
---|
108 | /* 70ns (tRC) */ |
---|
109 | .waitrd = LPC24XX_PS_TO_EMCCLK(70000, 1), |
---|
110 | |
---|
111 | /* 70ns (tRC) */ |
---|
112 | .waitpage = LPC24XX_PS_TO_EMCCLK(70000, 1), |
---|
113 | |
---|
114 | /* 20ns (tCHZ, TOHZ) */ |
---|
115 | .waitwr = LPC24XX_PS_TO_EMCCLK(20000, 2), |
---|
116 | |
---|
117 | /* 20ns (tCHZ, TOHZ) */ |
---|
118 | .waitrun = LPC24XX_PS_TO_EMCCLK(20000, 1) |
---|
119 | } |
---|
120 | } |
---|
121 | #endif |
---|
122 | }; |
---|
123 | |
---|
124 | BSP_START_DATA_SECTION const size_t |
---|
125 | lpc24xx_start_config_emc_static_chip_count = |
---|
126 | sizeof(lpc24xx_start_config_emc_static_chip) |
---|
127 | / sizeof(lpc24xx_start_config_emc_static_chip [0]); |
---|