source: rtems/c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c @ 991fdb33

4.115
Last change on this file since 991fdb33 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

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